Skip to content

Commit

Permalink
Merge pull request #44 from JarronL/develop
Browse files Browse the repository at this point in the history
minor bug fixes for GO proposals
  • Loading branch information
JarronL committed Nov 19, 2020
2 parents 6a3b01c + 91bc5fe commit 28bd7a5
Show file tree
Hide file tree
Showing 22 changed files with 331 additions and 146 deletions.
Binary file added notebooks/GO/BDI/BetaPic_contours_F410M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/BetaPic_contours_F430M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/BetaPic_contours_F460M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/BetaPic_contours_F480M.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added notebooks/GO/BDI/Columba_contours_F410M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/Columba_contours_F430M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/Columba_contours_F460M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/Mass_contours_F480M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/UpperSco_contours_F430M.pdf
Binary file not shown.
Binary file added notebooks/GO/BDI/UpperSco_contours_F460M.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
447 changes: 311 additions & 136 deletions notebooks/GO/NRC_GO_YSO_RXJ1615.ipynb

Large diffs are not rendered by default.

Binary file modified notebooks/GO/YSOs/RXJ1615_SED.pdf
Binary file not shown.
Binary file added notebooks/GO/YSOs/RXJ1615_contrast_compare_LW.pdf
Binary file not shown.
Binary file not shown.
Binary file modified notebooks/GO/YSOs/RXJ1615_images.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion notebooks/GTO/NRC_GTO_DebrisDisks_LWSW_M335R.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2687,7 +2687,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.7.9"
}
},
"nbformat": 4,
Expand Down
16 changes: 9 additions & 7 deletions pynrc/nb_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def disk_rim_model(a_asec, b_asec, pa=0, sig_asec=0.1, flux_frac=0.5,
return fits.HDUList([hdu])


def obs_wfe(wfe_drift, filt_list, sp_sci, dist, sp_ref=None, args_disk=None,
def obs_wfe(wfe_ref_drift, filt_list, sp_sci, dist, sp_ref=None, args_disk=None,
wind_mode='WINDOW', subsize=None, fov_pix=None, verbose=False, narrow=False):
"""
For a given WFE drift and series of filters, create a list of
Expand All @@ -173,7 +173,7 @@ def obs_wfe(wfe_drift, filt_list, sp_sci, dist, sp_ref=None, args_disk=None,
if sp_ref is None: sp_ref = sp_sci

obs_dict = {}
for filt, mask, pupil in filt_list:
for filt, pupil, mask in filt_list:
# Create identification key
key = make_key(filt, mask=mask, pupil=pupil)
print(key)
Expand Down Expand Up @@ -229,8 +229,8 @@ def obs_wfe(wfe_drift, filt_list, sp_sci, dist, sp_ref=None, args_disk=None,

# Initialize and store the observation
# A reference observation is stored inside each parent obs_hci class.
obs_dict[key] = obs_hci(sp_sci, sp_ref, dist, filter=filt, mask=mask, pupil=pupil,
wfe_ref_drift=wfe_drift, fov_pix=fov_pix, oversample=oversample,
obs_dict[key] = obs_hci(sp_sci, sp_ref, dist, filter=filt, mask=mask, pupil=pupil, module=module,
wfe_ref_drift=wfe_ref_drift, fov_pix=fov_pix, oversample=oversample,
wind_mode=wind_mode, xpix=subuse, ypix=subuse,
disk_hdu=hdu_disk, verbose=verbose, bar_offset=bar_offset)
fov_pix = fov_pix_orig
Expand Down Expand Up @@ -314,11 +314,13 @@ def obs_optimize(obs_dict, sp_opt=None, well_levels=None, tacq_max=1800, **kwarg
print(strout)

# SW filter piggy-back on two LW filters, so 2 x tacq
is_SW = obs.bandpass.avgwave()/1e4 < 2.5
if is_SW: v3 *= 2
# is_SW = obs.bandpass.avgwave()/1e4 < 2.5
# if is_SW:
# v3 *= 2

# Coronagraphic observations have two roll positions, so cut NINT by 2
if obs.mask is not None: v3 = int(v3/2)
if obs.mask is not None:
v3 = int(v3/2)
obs2.update_detectors(read_mode=v1, ngroup=v2, nint=v3)


Expand Down
12 changes: 10 additions & 2 deletions pynrc/obs_nircam.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@ class nrc_hci(NIRCam):

def __init__(self, wind_mode='WINDOW', xpix=320, ypix=320, wfe_drift=True, verbose=False, **kwargs):

if 'FULL' in wind_mode: xpix = ypix = 2048
if 'STRIPE' in wind_mode: xpix = 2048
# Ensure xpix and ypix values make sense
# And set to Mod B if direct imaging in window mode;
# defaults to Mod A otherwise (or overided by user-specified settings)
if 'FULL' in wind_mode:
xpix = ypix = 2048
elif 'STRIPE' in wind_mode:
xpix = 2048
else: # WINDOW; default to Mod B if direct imaging
if kwargs.get('module', None) is None:
kwargs['module'] = 'B' if kwargs.get('mask',None) is None else 'A'

#super(NIRCam,self).__init__(**kwargs)
NIRCam.__init__(self, wind_mode=wind_mode, xpix=xpix, ypix=ypix, wfe_drift=False, **kwargs)
Expand Down

0 comments on commit 28bd7a5

Please sign in to comment.