Skip to content

fourth-order moments #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
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
13 changes: 11 additions & 2 deletions docs/source/pipeline_canfar.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,19 @@ 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
combine_runs.bash -p $psf -c psf

## The following are not necessary, only to get merged catalogue with non-converted quantities
shapepipe_run -c $SP_CONFIG/config_Ms_$psf.ini
shapepipe_run -c $SP_CONFIG/config_Pl_$psf.ini

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

## The following are not necessary, only to get merged catalogue with non-converted quantities
shapepipe_run -c $SP_CONFIG/config_Msval_$psf.ini


# Convert star cat to WCS
## Convert all input validation psf files and create directories par patch
## psf_conv_all/P?
Expand All @@ -135,7 +144,7 @@ cd ../star_cat
convert_psf_pix2world.py -i .. -P $patchnum -v

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

Expand Down
70 changes: 70 additions & 0 deletions example/cfis/config_Msval_psfex.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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

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

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

HDU = 2
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 = "[email protected]" }
]
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