Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions docs/source/pipeline_canfar.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,28 @@ patchnum=`tr $patch P ''`
create_final_cat.py -m final_cat_$patch.hdf5 -i . -p $patch/cfis/final_cat.param -P $patchnum -o $patch/n_tiles_final.txt -v

# Star catalogue
combine_runs.bash -p $psf -c psf
shapepipe_run -c $SP_CONFIG/config_Ms_$psf.ini
shapepipe_run -c $SP_CONFIG/config_Pl_$psf.ini

## With fourth-order moment, combine additional psf interpol validation runs
combine_runs.bash -p $psf -c psf_val

# Convert star cat to WCS
## Convert all input validation psf files and create directories par patch
## psf_conv_all/P?
cd ../star_cat
cd ../star_cat_val

# Create files validation_psf_conv-<patchnum>-<idx>.fits
# (for the v1.4 setup only one file)
convert_psf_pix2world.py -i .. -P $patchnum -v
## Create files validation_psf_conv-<patchnum>-<idx>.fits
## (for the v1.4 setup only one file)
## previous convert_psf_pix2world.py -i .. -P $patchnum -v
for p in 1 2 3 4 5 6 7; do
convert_psf_pix2world.py -i .. -P $p --sub_dir_pattern=run_sp_combined_psf_val -v
done

# Combine previously created files as links within one SP run dir
# (for the v1.4 setup only one link
cd P$patch
## Combine previously created files as links within one SP run dir
combine_runs.bash -p psfex -c psf_conv

# Merge all converted star catalogues and create final-starcat.fits
## Merge all converted star catalogues and create final-starcat.fits
export SP_RUN=`pwd`
shapepipe_run -c ~/shapepipe/example/cfis/config_Ms_psfex_conv.ini
shapepipe_run -c ~/shapepipe/example/cfis/config_Msval_psfex.ini


# Extra stuff
Expand Down
71 changes: 71 additions & 0 deletions example/cfis/config_Msval_psfex.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# ShapePipe configuration file for post-processing.
# merge star cat.


## Default ShapePipe options
[DEFAULT]

# verbose mode (optional), default: True, print messages on terminal
VERBOSE = True

# Name of run (optional) default: shapepipe_run
RUN_NAME = run_sp_Msval

# Add date and time to RUN_NAME, optional, default: False
RUN_DATETIME = False


## ShapePipe execution options
[EXECUTION]

# Module name, single string or comma-separated list of valid module runner names
MODULE = merge_starcat_runner

# Parallel processing mode, SMP or MPI
MODE = SMP


## ShapePipe file handling options
[FILE]

# Log file master name, optional, default: shapepipe
LOG_NAME = log_sp

# Runner log file name, optional, default: shapepipe_runs
RUN_LOG_NAME = log_run_sp

# Input directory, containing input files, single string or list of names
INPUT_DIR = $SP_RUN/output

# Output directory
OUTPUT_DIR = $SP_RUN/output


## ShapePipe job handling options
[JOB]

# Batch size of parallel processing (optional), default is 1, i.e. run all jobs in serial
SMP_BATCH_SIZE = 4

# Timeout value (optional), default is None, i.e. no timeout limit applied
TIMEOUT = 96:00:00


## Module options
[MERGE_STARCAT_RUNNER]

INPUT_DIR = last:psfex_interp_runner

PSF_MODEL = psfex

#NUMBERING_SCHEME = -0000000-0
NUMBERING_SCHEME = -0-0

# Input file pattern(s), list of strings with length matching number of expected input file types
# Cannot contain wild cards
FILE_PATTERN = validation_psf_conv

# FILE_EXT (optional) list of string extensions to identify input files
FILE_EXT = .fits

HDU = 1
82 changes: 82 additions & 0 deletions example/cfis/config_exp_psfex_validation.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# ShapePipe configuration file for single-exposures. PSFex PSF model
# validation.


## Default ShapePipe options
[DEFAULT]

# verbose mode (optional), default: True, print messages on terminal
VERBOSE = True

# Name of run (optional) default: shapepipe_run
RUN_NAME = run_sp_exp_Pv

# Add date and time to RUN_NAME, optional, default: True
; RUN_DATETIME = False


## ShapePipe execution options
[EXECUTION]

# Module name, single string or comma-separated list of valid module runner names
MODULE = psfex_interp_runner


# Run mode, SMP or MPI
MODE = SMP


## ShapePipe file handling options
[FILE]

# Log file master name, optional, default: shapepipe
LOG_NAME = log_sp

# Runner log file name, optional, default: shapepipe_runs
RUN_LOG_NAME = log_run_sp

# Input directory, containing input files, single string or list of names with length matching FILE_PATTERN
INPUT_DIR = $SP_RUN/output

# Output directory
OUTPUT_DIR = $SP_RUN/output


## ShapePipe job handling options
[JOB]

# Batch size of parallel processing (optional), default is 1, i.e. run all jobs in serial
SMP_BATCH_SIZE = 16

# Timeout value (optional), default is None, i.e. no timeout limit applied
TIMEOUT = 96:00:00


## Module options

[PSFEX_INTERP_RUNNER]

# Use 20% sample for PSF validation
FILE_PATTERN = star_split_ratio_80, star_split_ratio_20, psfex_cat

FILE_EXT = .psf, .fits, .cat

NUMBERING_SCHEME = -0000000-0

# Run mode for psfex interpolation:
# CLASSIC: 'classical' run, interpolate to object positions
# MULTI-EPOCH: interpolate for multi-epoch images
# VALIDATION: validation for single-epoch images
MODE = VALIDATION

# Column names of position parameters
POSITION_PARAMS = XWIN_IMAGE,YWIN_IMAGE

# If True, measure and store ellipticity of the PSF (using moments)
GET_SHAPES = True

# Minimum number of stars per CCD for PSF model to be computed
STAR_THRESH = 22

# Maximum chi^2 for PSF model to be computed on CCD
CHI2_THRESH = 2
22 changes: 20 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
{ name = "Martin Kilbinger", email = "martin.kilbinger@cea.fr" }
]
license = { "file" = "LICENSE" }
requires-python = ">=3.11"
requires-python = ">=3.9"
dependencies = [
"joblib>=0.13",
"modopt>=1.2",
Expand Down Expand Up @@ -46,4 +46,22 @@ shapepipe_run = "shapepipe.shapepipe_run:main"

[tool.pytest.ini_options]
addopts = "--verbose --cov=shapepipe"
testpaths = ["shapepipe"]
testpaths = ["shapepipe"]

[tool.setuptools]
include-package-data = true

[tool.setuptools.data-files]
"bin" = [
"scripts/sh/job_sp_canfar.bash",
"scripts/sh/init_run_exclusive_canfar.sh",
"scripts/sh/curl_canfar_local.sh",
"scripts/sh/functions.sh",
"scripts/sh/stats_jobs_canfar.sh",
"scripts/sh/combine_runs.bash",
"scripts/python/update_runs_log_file.py",
"scripts/python/summary_run.py",
"scripts/python/summary_params_pre_v2.py",
"scripts/python/link_to_exp_for_tile.py",
"scripts/python/convert_psf_pix2world.py",
]
Loading
Loading