Skip to content

Commit

Permalink
Merge pull request #77 from carlgogo/master
Browse files Browse the repository at this point in the history
v0.7.1 - minor fixes
  • Loading branch information
carlos-gg authored May 22, 2017
2 parents 6ebf8e7 + 6204d20 commit 49cd707
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
5 changes: 3 additions & 2 deletions readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ VIP - Vortex Image Processing package
Attribution
------------

Please cite Gomez Gonzalez et al. 2017 (accepted) whenever you publish data
reduced with VIP. Astrophysics Source Code Library reference [ascl:1603.003]
Please cite Gomez Gonzalez et al. 2017 (accepted, `arXiv<http://arxiv.org/abs/1705.06184>`_)
whenever you publish data reduced with VIP. Astrophysics Source Code Library
reference [ascl:1603.003].


Introduction
Expand Down
2 changes: 1 addition & 1 deletion vip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from . import stats
from . import var

__version__ = "0.7.0"
__version__ = "0.7.1"

print("---------------------------------------------------")
print(" oooooo oooo ooooo ooooooooo. ")
Expand Down
4 changes: 2 additions & 2 deletions vip/pca/pca_fullfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
PCA algorithm performed on full frame for ADI, RDI or SDI (IFS data).
"""

from __future__ import division
from __future__ import division, print_function

__author__ = 'C. Gomez @ ULg'
__all__ = ['pca',
Expand Down Expand Up @@ -556,7 +556,7 @@ def truncate_svd_get_finframe(matrix, angle_list, ncomp, V):
transformed = np.dot(V[:ncomp], matrix.T)
reconstructed = np.dot(transformed.T, V[:ncomp])
residuals = matrix - reconstructed
frsize = np.sqrt(matrix.shape[1]) # only for square frames
frsize = int(np.sqrt(matrix.shape[1])) # only for square frames
residuals_res = reshape_matrix(residuals, frsize, frsize)
residuals_res_der = cube_derotate(residuals_res, angle_list)
frame = cube_collapse(residuals_res_der, mode=collapse)
Expand Down
4 changes: 2 additions & 2 deletions vip/phot/contrcurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ def throughput(cube, angle_list, psf_template, fwhm, pxscale, algo, nbranch=1,
# each branch is computed separately
for br in range(nbranch):
# each pattern is computed separately. For each pattern the companions
# are separated by "fc_rad_sep * fwhm"
for irad in range(fc_rad_sep):
# are separated by "fc_rad_sep * fwhm", interleaving the injections
for irad in range(fc_rad_sep):
radvec = vector_radd[irad::fc_rad_sep]
cube_fc = array.copy()
# filling map with small numbers
Expand Down
6 changes: 3 additions & 3 deletions vip/preproc/cosmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def cube_crop_frames(array, size, xy=None, verbose=True):
"""
if not array.ndim == 3:
raise TypeError('\nArray is not 3d, not a cube')
raise TypeError('Array is not 3d, not a cube')
if not isinstance(size, int):
raise TypeError('\nSize must be integer')
raise TypeError('Size must be integer')

if size%2!=0: size -= 1
if size >= array.shape[1]:
Expand All @@ -53,7 +53,7 @@ def cube_crop_frames(array, size, xy=None, verbose=True):

if xy is not None:
if not (isinstance(xy[0], int) or isinstance(xy[1], int)):
raise TypeError('\nXY must be a tuple of integers')
raise TypeError('XY must be a tuple of integers')
cenx, ceny = xy
# Note the +1 when closing the interval (python doesn't include the
# endpoint)
Expand Down
3 changes: 2 additions & 1 deletion vip/var/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def get_square_robust(array, size, y, x, position=False,
else:
# wing is added to the sides of the subframe center. Note the +1 when
# closing the interval (python doesn't include the endpoint)
array_view = array[y-wing_bef:y+wing_aft+1, x-wing_bef:x+wing_aft+1].copy()
array_view = array[int(y-wing_bef):int(y+wing_aft+1),
int(x-wing_bef):int(x+wing_aft+1)].copy()
if position: return array_view, y-wing_bef, x-wing_bef
else: return array_view

Expand Down
10 changes: 7 additions & 3 deletions vip/var/utils_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def pp_subplots(*args, **kwargs):
else: logscale = False

if kwargs.has_key('cmap'): custom_cmap = kwargs['cmap']
else: custom_cmap = 'CMRmap' # 'RdBu_r'
else: custom_cmap = 'magma' # 'CMRmap' 'RdBu_r'

if kwargs.has_key('colorb'): colorb = kwargs['colorb']
else: colorb = True
Expand Down Expand Up @@ -212,8 +212,12 @@ def pp_subplots(*args, **kwargs):
cb = colorbar(im, ax=ax, cax=cax, drawedges=False)
cb.outline.set_linewidth(0.1)
cb.ax.tick_params(labelsize=8)
if grid:
ax.grid('on', which='both', color='w')
if grid:
ax.tick_params(axis='both', which='minor')
minor_ticks = np.arange(0, data[i].shape[0], 10)
ax.set_xticks(minor_ticks, minor=True)
ax.set_yticks(minor_ticks, minor=True)
ax.grid('on', which='minor', color='gray', linewidth=1, alpha=.6)
else:
ax.grid('off')
if noax: ax.set_axis_off()
Expand Down

0 comments on commit 49cd707

Please sign in to comment.