Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/JarronL/pynrc
Browse files Browse the repository at this point in the history
  • Loading branch information
JarronL committed Sep 27, 2019
2 parents 92c03c2 + e35603a commit 223dae5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pynrc/nrc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ def psf_coeff(filter_or_bp, pupil=None, mask=None, module='A',
fname = fname + '_jsig{:.0f}_r{:.1f}_th{:.1f}'.format(jitter_sigma*1000,rtemp,ttemp)
fname = fname + '{}_{}'.format(bar_str,otemp)

fname = '{}{}_{}_{}_pix{}_os{}_jsig{:.0f}_r{:.1f}_th{:.1f}{}_{}'.\
fname = '{}{}_{}_{}_pix{}_os{}_jsig{:.0f}_r{:.2f}_th{:+.1f}{}_{}'.\
format(chan_str,module,ptemp,mtemp,fov_pix,oversample,\
jitter_sigma*1000,rtemp,ttemp,bar_str,otemp)

Expand Down Expand Up @@ -1947,6 +1947,8 @@ def gen_image_coeff(filter_or_bp, pupil=None, mask=None, module='A',

# Create a PSF for each wgood wavelength
psf_fit = jl_poly(wgood, coeff, dim_reorder=True)
# Just in case weird coeff gives negative values
psf_fit[psf_fit<0] = 0

# Multiply each monochromatic PSFs by the binned e/sec at each wavelength
# Array broadcasting: [nx,ny,nwave] x [0,0,nwave]
Expand Down
9 changes: 7 additions & 2 deletions pynrc/pynrc_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,11 +700,16 @@ def siaf_ap(self):
"""Science Instrument aperture info class"""
return self._siaf_ap

@property
def siaf_ap_names(self):
"""Give all possible SIAF aperture names"""
return list(self.siaf_nrc.apernames)

def update_from_SIAF(self, apname, pupil=None, **kwargs):
"""Update detector properties based on SIAF aperture"""

allap = list(self.siaf_nrc.apernames)
if not (apname in allap):
#allap = list(self.siaf_nrc.apernames)
if not (apname in self.siaf_ap_names):
_log.warning('Cannot find {} in siaf.apernames list.'.format(apname))
return

Expand Down

0 comments on commit 223dae5

Please sign in to comment.