Skip to content

Commit

Permalink
Document examples regarding the use of reduction configuration files
Browse files Browse the repository at this point in the history
Progress on #73
  • Loading branch information
Arthur Vigan committed Jun 13, 2022
1 parent 57a0b69 commit dc6615d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 22 deletions.
36 changes: 25 additions & 11 deletions examples/ifs_reduction.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import sphere.IFS as IFS

######################################################################
# Since version 1.4 of the pipeline, the default -1.75° true North #
# offset is automatically added to the derotation angles. The offset #
# value can be modified in the configuration of the reduction: #
# #
# >>> reduction.config[\'cal_true_north\'] = xxx #
# #
# To avoid any issues, make sure to: #
# * either reprocess data previously processed with version <1.4 #
# * or take into account the offset in your astrometric analysis #
######################################################################
###############################################################################
# Since version 1.4 of the pipeline, the default -1.75° true North offset is #
# automatically added to the derotation angles. The offset value can be #
# modified in the configuration of the reduction: #
# #
# >>> reduction.config[\'cal_true_north\'] = xxx #
# #
# To avoid any issues, make sure to: #
# * either reprocess data previously processed with version <1.4 #
# * or take into account the offset in your astrometric analysis #
###############################################################################

####################################################@
# full reduction
Expand All @@ -19,6 +19,20 @@
#%% init reduction
reduction = IFS.Reduction('/Users/avigan/data/sphere-test-target/IFS/', log_level='info')

###############################################################################
# It is possible to provide a default JSON configuration file to set some (or #
# all) of the reduction parameters to a default value different from the ones #
# hard-coded in the sphere package. This is done with the keyword: #
# user_config='... path to the file ...' #
# The increasing priority for setting reduction parameters is the following: #
# 0- default values hard-coded in the sphere package #
# 1- values contained in the file pointed by the user_config keyword, if a #
# file path is provided and exists #
# 2- values contained in a reduction_config.json file left in the reduction #
# directory by a previous reduction #
# 3- values manually set by the user (see examples below) #
###############################################################################

#%% configuration
reduction.config['preproc_collapse_science'] = True
reduction.config['preproc_collapse_type'] = 'coadd'
Expand Down
36 changes: 25 additions & 11 deletions examples/irdis_imaging_reduction.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import sphere.IRDIS as IRDIS

######################################################################
# Since version 1.4 of the pipeline, the default -1.75° true North #
# offset is automatically added to the derotation angles. The offset #
# value can be modified in the configuration of the reduction: #
# #
# >>> reduction.config[\'cal_true_north\'] = xxx #
# #
# To avoid any issues, make sure to: #
# * either reprocess data previously processed with version <1.4 #
# * or take into account the offset in your astrometric analysis #
######################################################################
###############################################################################
# Since version 1.4 of the pipeline, the default -1.75° true North offset is #
# automatically added to the derotation angles. The offset value can be #
# modified in the configuration of the reduction: #
# #
# >>> reduction.config[\'cal_true_north\'] = xxx #
# #
# To avoid any issues, make sure to: #
# * either reprocess data previously processed with version <1.4 #
# * or take into account the offset in your astrometric analysis #
###############################################################################

####################################################@
# full reduction
Expand All @@ -19,6 +19,20 @@
#%% init reduction
reduction = IRDIS.ImagingReduction('/Users/avigan/data/sphere-test-target/IRD/DBI/', log_level='info')

###############################################################################
# It is possible to provide a default JSON configuration file to set some (or #
# all) of the reduction parameters to a default value different from the ones #
# hard-coded in the sphere package. This is done with the keyword: #
# user_config='... path to the file ...' #
# The increasing priority for setting reduction parameters is the following: #
# 0- default values hard-coded in the sphere package #
# 1- values contained in the file pointed by the user_config keyword, if a #
# file path is provided and exists #
# 2- values contained in a reduction_config.json file left in the reduction #
# directory by a previous reduction #
# 3- values manually set by the user (see examples below) #
###############################################################################

#%% configuration
reduction.config['combine_psf_dim'] = 80
reduction.config['combine_science_dim'] = 400
Expand Down
14 changes: 14 additions & 0 deletions examples/irdis_spectro_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
#%% init reduction
reduction = IRDIS.SpectroReduction('/Users/avigan/data/sphere-test-target/IRD/LSS/', log_level='info')

###############################################################################
# It is possible to provide a default JSON configuration file to set some (or #
# all) of the reduction parameters to a default value different from the ones #
# hard-coded in the sphere package. This is done with the keyword: #
# user_config='... path to the file ...' #
# The increasing priority for setting reduction parameters is the following: #
# 0- default values hard-coded in the sphere package #
# 1- values contained in the file pointed by the user_config keyword, if a #
# file path is provided and exists #
# 2- values contained in a reduction_config.json file left in the reduction #
# directory by a previous reduction #
# 3- values manually set by the user (see examples below) #
###############################################################################

#%% configuration
reduction.config['combine_science_dim'] = 300
reduction.config['combine_center_selection'] = 'first'
Expand Down

0 comments on commit dc6615d

Please sign in to comment.