Skip to content
Merged
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
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- libtool==2.4.6
- matplotlib==3.3.4
- pip:
- mccd==0.0.4
- mccd==1.1.1
- modopt==1.5.1
- numba==0.53.1
- pandas==1.2.4
Expand Down
22 changes: 13 additions & 9 deletions example/cfis/config_MCCD.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ OUTLIER_STD_MAX = 100.
USE_SNR_WEIGHTS = False

[INSTANCE]
N_COMP_LOC = 12
D_COMP_GLOB = 3
KSIG_LOC = 1.0
KSIG_GLOB = 1.0
N_COMP_LOC = 4
D_COMP_GLOB = 6
KSIG_LOC = 0.00
KSIG_GLOB = 0.00
FILTER_PATH = None
D_HYB_LOC = 2
MIN_D_COMP_GLOB = None
RMSE_THRESH = 1.25
CCD_STAR_THRESH = 0.15

[FIT]
LOC_MODEL = hybrid
PSF_SIZE = 6.15
PSF_SIZE = 6.2
PSF_SIZE_TYPE = R2
N_EIGENVECTS = 5
N_ITER_RCA = 1
N_ITER_GLOB = 2
N_ITER_LOC = 2
NB_SUBITER_S_LOC = 100
NB_SUBITER_A_LOC = 500
NB_SUBITER_S_GLOB = 30
NB_SUBITER_S_LOC = 300
NB_SUBITER_A_LOC = 400
NB_SUBITER_S_GLOB = 100
NB_SUBITER_A_GLOB = 200

[VALIDATION]
Expand All @@ -39,7 +43,7 @@ VAL_REGEX_FILE_PATTERN = star_split_ratio_20-*-*.fits
VAL_SEPARATOR = -
APPLY_DEGRADATION = True
MCCD_DEBUG = False
GLOBAL_POL_INTERP = True
GLOBAL_POL_INTERP = False

# Parameter description:
#
Expand Down
81 changes: 54 additions & 27 deletions example/test_mccd/config_MCCD.ini
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
# Configuration file for the MCCD method

[INPUTS]
INPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/sex_inputs/
PREPROCESSED_OUTPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/preprocessed_inputs/
OUTPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/outputs/
INPUT_DIR = .
PREPROCESSED_OUTPUT_DIR = ./output
OUTPUT_DIR = ./output
INPUT_REGEX_FILE_PATTERN = star_split_ratio_80-*-*.fits
INPUT_SEPARATOR = -
MIN_N_STARS = 20
MIN_N_STARS = 22
OUTLIER_STD_MAX = 100.
USE_SNR_WEIGHTS = False

[INSTANCE]
N_COMP_LOC = 12
D_COMP_GLOB = 3
KSIG_LOC = 1.0
KSIG_GLOB = 1.0
N_COMP_LOC = 4
D_COMP_GLOB = 6
KSIG_LOC = 0.00
KSIG_GLOB = 0.00
FILTER_PATH = None
D_HYB_LOC = 2
MIN_D_COMP_GLOB = None
RMSE_THRESH = 1.25
CCD_STAR_THRESH = 0.15

[FIT]
LOC_MODEL = hybrid
PSF_SIZE = 6.15
PSF_SIZE = 6.2
PSF_SIZE_TYPE = R2
N_EIGENVECTS = 5
N_ITER_RCA = 1
N_ITER_GLOB = 2
N_ITER_LOC = 2
NB_SUBITER_S_LOC = 100
NB_SUBITER_A_LOC = 500
NB_SUBITER_S_GLOB = 30
NB_SUBITER_S_LOC = 300
NB_SUBITER_A_LOC = 400
NB_SUBITER_S_GLOB = 100
NB_SUBITER_A_GLOB = 200

[VALIDATION]
VAL_DATA_INPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/sex_inputs/
VAL_PREPROCESSED_OUTPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/preprocessed_inputs/
VAL_MODEL_INPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/outputs/
VAL_OUTPUT_DIR = /Users/tliaudat/Documents/PhD/github/cosmostat_official/mccd/tests/hidden_tests/outputs/
VAL_DATA_INPUT_DIR = .
VAL_PREPROCESSED_OUTPUT_DIR = ./output
VAL_MODEL_INPUT_DIR = ./output
VAL_OUTPUT_DIR = ./output
VAL_REGEX_FILE_PATTERN = star_split_ratio_20-*-*.fits
VAL_SEPARATOR = -
APPLY_DEGRADATION = True
MCCD_DEBUG = False
GLOBAL_POL_INTERP = True
GLOBAL_POL_INTERP = False

# Parameter description:
#
#
# [INPUTS]
# INPUT_DIR : (Required) Must be a valid directory containing the input
# MCCD files.
# PREPROCESSED_OUTPUT_DIR : (Required) Must be a valid directory to write the
# preprocessed input files.
# OUTPUT_DIR : (Required) Must be a valid directory to write the output files.
# The constructed models will be saved.
# INPUT_REGEX_FILE_PATTERN : File pattern of the input files to use. It should
# follow regex (regular expression) standards.
# INPUT_SEPARATOR : Separator of the different fields in the filename,
Expand All @@ -62,6 +62,10 @@ GLOBAL_POL_INTERP = True
# USE_SNR_WEIGHTS : Boolean to determine if the SNR weighting strategy will
# be used.
# For now, it needs the SNR estimations from SExtractor.
# PREPROCESSED_OUTPUT_DIR : (Required) Must be a valid directory to write the
# preprocessed input files.
# OUTPUT_DIR : (Required) Must be a valid directory to write the output files.
# The constructed models will be saved.
#
#
# [INSTANCE]
Expand All @@ -73,6 +77,31 @@ GLOBAL_POL_INTERP = True
# KSIG_GLOB : Denoising parameter of the global model.
# ie 1 is a normal denoising, 3 is a hard denoising.
# FILTER_PATH : Path for predefined filters.
# D_HYB_LOC : Degree of the polynomial component for the local part in case
# the LOC_MODEL used is 'hybrid'.
# MIN_D_COMP_GLOB : The minimum degree of the polynomial for the global
# component. For example, if the paramter is set to 1, the
# polynomials of degree 0 and 1 will be excluded from the
# global polynomial variations. ``None`` means that we are
# not excluding any degree.
# RMSE_THRESH : Parameter concerning the CCD outlier rejection. Once the PSF
# model is calculated we perform an outlier check on the training
# stars. We divide each star in two parts with a given circle.
# The inner part corresponds to the most of the PSF/star energy
# while the outer part corresponds to the observation background.
# The outer part is used to calculate the noise level and the inner
# part to calculate the model residual
# (star observation - PSF model reconstruction). If the RMSE error
# of the residual divided by the noise level is over the RMSE_THRESH,
# the star will be considered an outlier. A perfect reconstruction
# would have RMSE_THRESH equal to 1.
# CCD_STAR_THRESH : Parameter concerning the CCD outlier rejection. If the
# percentage of outlier stars in a single CCD is bigger than
# CCD_STAR_THRESH, the CCD is considered to be an outlier.
# In this case, the CCD is rejected from the PSF model.
# A value lower than 0 means that no outlier rejection
# will be done.
#
#
#
# [FIT]
Expand All @@ -97,16 +126,14 @@ GLOBAL_POL_INTERP = True
#
#
# [VALIDATION]
# MODEL_INPUT_DIR : (Required) Must be a valid directory which contains the
# saved trained models.
# VAL_DATA_INPUT_DIR : (Required) Must be a valid directory which contains the
# validation input data (test dataset).
# VAL_PREPROCESSED_OUTPUT_DIR : (Required) Must be a valid directory where the
# preprocessed input file will be saved.
# VAL_MODEL_INPUT_DIR : (Required) Must be a valid directory which contains the
# saved trained models.
# VAL_OUTPUT_DIR : (Required) Must be a valid directory where to save the
# validation outputs, test PSFs and interpolated PSFs.
# VAL_REGEX_FILE_PATTERN : Same as INPUT_REGEX_FILE_PATTERN but for validation.
# VAL_SEPARATOR : Same as INPUT_SEPARATOR but for validation.
# VAL_OUTPUT_DIR : (Required) Must be a valid directory where to save the
# validation outputs, test PSFs and interpolated PSFs.
# APPLY_DEGRADATION : Whether the PSF models should be degraded
# (sampling/shifts/flux) to match stars; use True if you
# plan on making pixel-based comparisons (residuals etc.).
Expand Down