Skip to content

Commit

Permalink
this commit improve efficiency by reading a new field point only when…
Browse files Browse the repository at this point in the history
… necesary it also fix pysiaf requirements including in pyprojecttoml
  • Loading branch information
obi-wan76 committed Dec 4, 2024
1 parent 7fd0fbc commit 16d3312
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies = [
"astropy>=5.1.0",
"photutils>=1.10.0",
"poppy>=1.0.0",
"pysiaf>=0.19.1",
"pysiaf>=0.23.3",
"synphot>=1.0.0",
"astroquery>=0.4.6",
]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ matplotlib>=3.9.1,<3.10.0
numpy>=2.1.0,<2.2.0
photutils>=1.13.0,<2.1.0
poppy>=1.0.0
pysiaf>=0.23.3,<0.24.1
pysiaf>=0.23.3,<=0.24.1
scipy>=1.14.0,<1.15.0
synphot>=1.4.0,<1.5.0
astroquery>=0.4.7,<0.5.0
10 changes: 7 additions & 3 deletions webbpsf/trending.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,13 @@ def single_measurement_trending_plot(
target_1024 = astropy.io.fits.getdata(was_targ_file)
target_256 = poppy.utils.krebin(target_1024, (256, 256)) / 16 # scale factor for rebinning w/out increasing values

prev_target_1024 = astropy.io.fits.getdata(prev_was_targ_file)
prev_target_256 = poppy.utils.krebin(prev_target_1024,
(256, 256)) / 16 # scale factor for rebinning w/out increasing values
if prev_was_targ_file != was_targ_file:
prev_target_1024 = astropy.io.fits.getdata(prev_was_targ_file)
prev_target_256 = poppy.utils.krebin(prev_target_1024,
(256, 256)) / 16 # scale factor for rebinning w/out increasing values
else:
prev_target_256 = target_256


opd -= target_256
prev_opd -= prev_target_256
Expand Down

0 comments on commit 16d3312

Please sign in to comment.