Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDelaX committed Aug 5, 2022
1 parent a4a33e0 commit a0188cc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion heeps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import (absolute_import)

__version__ = "0.1.1"
__version__ = "1.0.0"

from . import config
from . import wavefront
Expand Down
11 changes: 10 additions & 1 deletion heeps/config/read_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@


def read_config(verbose=False, **update_conf):
"""Creates a configuration dictionary
"""Creates a configuration dictionary with all useful parameters
set to their default values. The user can specify different values
either by editing the read_config file, or by passing a dictionary
as argument.
Args:
update_conf:
user specified values
Returns:
conf (dict):
configuration dictionary for end-to-end simulation
"""

Expand Down
11 changes: 5 additions & 6 deletions heeps/config/update_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ def update_config(band='L', band_specs={'L':{}}, mode='RAVC', lam=3.8e-6,
pupil_img_size=40, diam_ext=37, diam_int=11, ngrid=1024, pscale=5.47,
hfov=1, ravc_calc=False, ravc_t=0.8 ,ravc_r=0.6, saveconf=False,
verbose=False, **conf):
"""Updates some configuration parameters before running the end-to-end
simulation.
'''
Update config parameters. The following parameters will be updated to match
the selected spectral band:
The following parameters are updated to match the selected spectral band:
lam, pscale, flux_star, flux_bckg, npupil, diam_norm, beam_ratio, ndet,
hfov, hfov_lamD
For the RAVC mode, the following parameters will be updated:
For the RAVC mode, the following parameters are also updated:
r_obstr, ravc_t, ravc_r
Returns: conf (updated and sorted)
'''
"""

if verbose is True:
print('Simulation config: band=%s, mode=%s'%(band, mode))
Expand Down
8 changes: 3 additions & 5 deletions heeps/pupil/pupil.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .create_pupil import create_pupil
from .create_petal import create_petal
from heeps.util.img_processing import resize_img, pad_img
from heeps.util.save2fits import save2fits
import proper
Expand All @@ -14,11 +13,9 @@ def pupil(pup=None, f_pupil='', lam=3.8e-6, ngrid=1024, npupil=285,
seg_ny=[10,13,16,19,22,23,24,25,26,27,28,29,30,31,30,31,
30,31,30,31,30,31,30,29,28,27,26,25,24,23,22,19,16,13,10],
seg_missing=[], norm_I=True, savefits=False, verbose=False, **conf):

''' Create a wavefront object at the entrance pupil plane.
"""Creates a wavefront object at the entrance pupil plane.
The pupil is either loaded from a fits file, or created using
pupil parameters.
Can also select only one petal and mask the others.
Args:
dir_output (str):
Expand Down Expand Up @@ -55,7 +52,8 @@ def pupil(pup=None, f_pupil='', lam=3.8e-6, ngrid=1024, npupil=285,
number of hexagonal segments per column (from left to right)
seg_missing: list of tupples
coordinates of missing segments
'''
"""

if verbose is True:
print("Entrance pupil:", end=' ')
Expand Down

0 comments on commit a0188cc

Please sign in to comment.