Skip to content

Commit

Permalink
fix disk model bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
JarronL committed Mar 19, 2020
1 parent 5789c14 commit 189d5f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pynrc/nb_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ def obs_wfe(wfe_drift, filt_list, sp_sci, dist, sp_ref=None, args_disk=None,
hdu_disk = None
elif 'auto' in args_disk:
# Convert to photons/sec in specified filter
args_disk = model_info(sp_sci.name, filt, dist)
hdu_disk = model_to_hdulist(args_disk, sp_sci, filt, pupil=pupil, mask=mask)
args_disk_temp = model_info(sp_sci.name, filt, dist)
hdu_disk = model_to_hdulist(args_disk_temp, sp_sci, filt, pupil=pupil, mask=mask)
else:
hdu_disk = model_to_hdulist(args_disk, sp_sci, filt, pupil=pupil, mask=mask)

fov_pix_orig = fov_pix
# Define the subarray readout size
if 'FULL' in wind_mode: # Full frame
Expand Down
8 changes: 5 additions & 3 deletions pynrc/obs_nircam.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,11 @@ def _gen_disk_hdulist(self):

# Get rid of the central star flux
# and anything interior to a few pixels
#image = disk_hdul[0].data
#image_rho = dist_image(image)
#image[image_rho < 4] = 0
image = disk_hdul[0].data
image_rho = dist_image(image)
ind_max = image == image.max()
if (image[image_rho<3].max() == image.max()) and (image.max()>1000*image[~ind_max].max()):
image[image_rho < 3] = 0

# Resample disk to detector pixel scale
# args_in = (input pixelscale, input distance)
Expand Down

0 comments on commit 189d5f0

Please sign in to comment.