Skip to content

Commit 3b2448e

Browse files
psfval: special summary (not enough stars); combine runs
1 parent 1014f19 commit 3b2448e

File tree

5 files changed

+28
-7
lines changed

5 files changed

+28
-7
lines changed

docs/source/pipeline_canfar.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ combine_runs.bash -p $psf -c psf
125125
shapepipe_run -c $SP_CONFIG/config_Ms_$psf.ini
126126
shapepipe_run -c $SP_CONFIG/config_Pl_$psf.ini
127127

128+
# With fourth-order moment, additional psf interpol validation runs
129+
combine_runs.bash -p $psf -c psf_val
130+
131+
128132
# Convert star cat to WCS
129133
## Convert all input validation psf files and create directories par patch
130134
## psf_conv_all/P?

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ include-package-data = true
5858
"scripts/sh/curl_canfar_local.sh",
5959
"scripts/sh/functions.sh",
6060
"scripts/sh/stats_jobs_canfar.sh",
61+
"scripts/sh/combine_runs.sh",
6162
"scripts/python/update_runs_log_file.py",
6263
"scripts/python/summary_run.py",
6364
"scripts/python/summary_params_pre_v2.py",

scripts/python/summary_params_pre_v2.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,16 @@ def set_jobs_v2_pre_v2(patch, verbose):
251251
# PSF validation
252252
jobs["1024"] = job_data(
253253
1024,
254-
["run_sp_exp_Pv"],
255-
["psfex_interp_runner"],
254+
"run_sp_exp_Pv",
255+
["psfex_interp_runner"] * 2,
256256
"shdus",
257-
n_mult=[1],
257+
n_mult=[1] * 2,
258258
path_main=path_main,
259259
path_left="exp_runs",
260260
output_subdirs="shdus",
261261
path_right="output",
262-
path_output="output",
262+
path_output=["output", "logs"],
263+
special=[False, True],
263264
verbose=verbose,
264265
)
265266

scripts/sh/combine_runs.bash

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ usage="Usage: $(basename "$0") [OPTIONS]
2020
\tPSF model, allowed are 'psfex', 'mccd', 'setools', default='$psf'\n
2121
-c, --cat TYPE\n
2222
\tCatalogue type, allowed are 'final', 'flag_tile', 'flag_exp', \n
23-
\t'psf', 'psf_conv', 'image', 'shdu', default='$cat'\n
23+
\t'psf', 'psf_val', 'psf_conv', 'image', 'shdu', default='$cat'\n
2424
"
2525

2626
## Parse command line
@@ -53,10 +53,11 @@ if [ "$cat" != "final" ] \
5353
&& [ "$cat" != "tile_detection" ] \
5454
&& [ "$cat" != "flag_exp" ] \
5555
&& [ "$cat" != "psf" ] \
56+
&& [ "$cat" != "psf_val" ] \
5657
&& [ "$cat" != "psf_conv" ] \
5758
&& [ "$cat" != "image" ] \
5859
&& [ "$cat" != "shdu" ]; then
59-
echo "cat (option -c) needs to be 'final', 'tile_detection', 'flag_tile', 'flag_exp', 'psf', 'psf_conv', 'shdu', or 'image'"
60+
echo "cat (option -c) needs to be 'final', 'tile_detection', 'flag_tile', 'flag_exp', 'psf', 'psf_val', 'psf_conv', 'shdu', or 'image'"
6061
exit 2
6162
fi
6263

@@ -163,9 +164,14 @@ elif [ "$cat" == "psf" ]; then
163164
module="mccd_interp_runner"
164165
fi
165166

167+
elif [ "$cat" == "psf_val" ]; then
168+
169+
run_in="$pwd/exp_runs/*/$out_base/run_sp_exp_Pv_*"
170+
pattern="validation_psf-*"
171+
module="psfex_interp_runner"
172+
166173
elif [ "$cat" == "psf_conv" ]; then
167174

168-
#run_in="$pwd/../P?"
169175
run_in="$pwd"
170176
pattern="validation_psf_conv-*"
171177
module="psfex_interp_runner"

src/shapepipe/utilities/summary.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,15 @@ def check_special_one(module, path):
198198
msg = "found array of size 0"
199199
return msg, code
200200

201+
m = re.search(
202+
"Not enough stars to interpolate the psf",
203+
line,
204+
)
205+
if m:
206+
code = 8
207+
msg = "not enough stars"
208+
return msg, code
209+
201210
if module == "mask_runner":
202211
m = re.search("Empty or corrupt FITS file", line)
203212
if m:

0 commit comments

Comments
 (0)