Skip to content

Commit

Permalink
Merge pull request #170 from carlgogo/master
Browse files Browse the repository at this point in the history
Updating docs
  • Loading branch information
carlos-gg authored Apr 16, 2018
2 parents fdac955 + f292315 commit 5115a72
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
8 changes: 0 additions & 8 deletions docs/source/vip_hci.fits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,4 @@ vip\_hci\.fits\.fits module
:undoc-members:
:show-inheritance:

vip\_hci\.fits\.vipds9 module
-----------------------------

.. automodule:: vip_hci.fits.vipds9
:members:
:undoc-members:
:show-inheritance:


20 changes: 20 additions & 0 deletions docs/source/vip_hci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,23 @@ Subpackages
vip_hci.stats
vip_hci.var

Submodules
----------

vip\_hci\.hci\_cube module
--------------------------

.. automodule:: vip_hci.hci_cube
:members:
:undoc-members:
:show-inheritance:

vip\_hci\.vip\_ds9 module
-------------------------

.. automodule:: vip_hci.vip_ds9
:members:
:undoc-members:
:show-inheritance:


8 changes: 0 additions & 8 deletions docs/source/vip_hci.stats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ vip\_hci\.stats\.clip\_sigma module
:undoc-members:
:show-inheritance:

vip\_hci\.stats\.cube\_stats module
-----------------------------------

.. automodule:: vip_hci.stats.cube_stats
:members:
:undoc-members:
:show-inheritance:

vip\_hci\.stats\.distances module
---------------------------------

Expand Down
18 changes: 9 additions & 9 deletions vip_hci/var/fit_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import pandas as pd
import photutils
from astropy.modeling import models, fitting
from astropy.modeling.models import Gaussian2D, Moffat2D, AiryDisk2D
from astropy.stats import (gaussian_sigma_to_fwhm, gaussian_fwhm_to_sigma,
sigma_clipped_stats)
from .shapes import get_square, frame_center
Expand Down Expand Up @@ -95,23 +94,24 @@ def create_synth_psf(model='gauss', shape=(9, 9), amplitude=1, x_mean=None,
else:
fwhm_y = fwhm
fwhm_x = fwhm
gauss = Gaussian2D(amplitude=amplitude, x_mean=x_mean, y_mean=y_mean,
x_stddev=fwhm_x * gaussian_fwhm_to_sigma,
y_stddev=fwhm_y * gaussian_fwhm_to_sigma,
theta=np.deg2rad(theta))
gauss = models.Gaussian2D(amplitude=amplitude, x_mean=x_mean,
y_mean=y_mean,
x_stddev=fwhm_x * gaussian_fwhm_to_sigma,
y_stddev=fwhm_y * gaussian_fwhm_to_sigma,
theta=np.deg2rad(theta))
im = gauss(x, y)
elif model == 'moff':
if gamma is None and fwhm is not None:
gamma = fwhm / (2. * np.sqrt(2 ** (1 / alpha) - 1))
moffat = Moffat2D(amplitude=amplitude, x_0=x_mean, y_0=y_mean,
gamma=gamma, alpha=alpha)
moffat = models.Moffat2D(amplitude=amplitude, x_0=x_mean,
y_0=y_mean, gamma=gamma, alpha=alpha)
im = moffat(x, y)
elif model == 'airy':
if radius is None and fwhm is not None:
diam_1st_zero = (fwhm * 2.44) / 1.028
radius = diam_1st_zero / 2.
airy = AiryDisk2D(amplitude=amplitude, x_0=x_mean, y_0=y_mean,
radius=radius)
airy = models.AiryDisk2D(amplitude=amplitude, x_0=x_mean,
y_0=y_mean, radius=radius)
im = airy(x, y)
return im
# 3d case
Expand Down

0 comments on commit 5115a72

Please sign in to comment.