Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25c3665

Browse files
committed
Added a check to determine whether the spec products already exist using source.get_spectra() before running the generation process (#1265)
Signed-off-by: rz-wang <rzwang@umich.edu>
1 parentdfb1be4 commit25c3665

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎xga/generate/ciao/spec.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ def _chandra_spec_cmds(sources: Union[BaseSource, BaseSample], outer_radius: Uni
152152
extra_file_name=''
153153
grouptype_int='NONE'
154154
binspec_int='NONE'
155+
156+
# Do we actually need to run this generation? If matching products already exist then we won't bother
157+
try:
158+
source.get_spectra(obs_id=obs_id,inst=inst,telescope='chandra',outer_radius=outer_radius,inner_radius=inner_radius)
159+
# If the expected outputs from this function do exist for the current ObsID, we'll just
160+
# move on to the next one
161+
continue
162+
exceptNoProductAvailableError:
163+
pass
155164

156165
# Setting up the top level path for the eventual destination of the products to be generated here
157166
dest_dir=os.path.join(OUTPUT,"chandra",obs_id)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp