Skip to content

Commit

Permalink
Address Aarynn's comments part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
kammerje committed Jul 10, 2024
1 parent 701cd0f commit b77e449
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions spaceKLIP/pyklippipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,24 @@ def run_obs(database,

# Run KLIP subtraction.
for mode in kwargs['mode']:

# Initialize pyKLIP dataset.
pop_pxar_kw(np.append(filepaths, psflib_filepaths))
dataset = JWSTData(filepaths, psflib_filepaths, highpass=kwargs_temp['highpass'])
kwargs_temp['dataset'] = dataset
kwargs_temp['aligned_center'] = dataset._centers[0]
kwargs_temp['psf_library'] = dataset.psflib
kwargs_temp['mode'] = mode

# Can run pyKLIP multiple times on the same dataset with different
# annuli and subsections.
for annu in kwargs['annuli']:
for subs in kwargs['subsections']:
log.info(' --> pyKLIP: mode = ' + mode + ', annuli = ' + str(annu) + ', subsections = ' + str(subs))
fileprefix = mode + '_NANNU' + str(annu) + '_NSUBS' + str(subs) + '_' + key

# Initialize pyKLIP dataset.
pop_pxar_kw(np.append(filepaths, psflib_filepaths))
dataset = JWSTData(filepaths, psflib_filepaths, highpass=kwargs_temp['highpass'])
kwargs_temp['dataset'] = dataset
kwargs_temp['aligned_center'] = dataset._centers[0]
kwargs_temp['psf_library'] = dataset.psflib
# Add/update ramaining keywords.
kwargs_temp['fileprefix'] = fileprefix
kwargs_temp['mode'] = mode
kwargs_temp['annuli'] = annu
kwargs_temp['subsections'] = subs
kwargs_temp_temp = kwargs_temp.copy()
Expand Down

0 comments on commit b77e449

Please sign in to comment.