Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Vigan committed Jun 14, 2022
2 parents 3b70dcb + 62a2291 commit 4b3b096
Show file tree
Hide file tree
Showing 22 changed files with 1,228 additions and 968 deletions.
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ Please cite the following reference if you use this pipeline in a scientific pub

* [Vigan, 2020, ASCL, ascl:2009.002](https://ui.adsabs.harvard.edu/abs/2020ascl.soft09002V/abstract)

Or simply use the following Bibtex entry:

```
@MISC{2020ascl.soft09002V,
author = {{Vigan}, Arthur},
title = "{vlt-sphere: Automatic VLT/SPHERE data reduction and analysis}",
keywords = {Software},
year = 2020,
month = sep,
doi = {10.5281/zenodo.6563998},
eid = {ascl:2009.002},
pages = {ascl:2009.002},
archivePrefix = {ascl},
eprint = {2009.002},
adsurl = {https://ui.adsabs.harvard.edu/abs/2020ascl.soft09002V},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
```

Moreover, the development of the SPHERE instrument has demanded a tremendous effort from many scientists, who have devoted several years of their life to design, build, test and commission the instrument. To recognize this work, we kindly ask you to cite the relevant instrumental papers in your scientific work. The reference papers for the instrument and its observing mode are:

SPHERE:
Expand Down Expand Up @@ -73,7 +92,8 @@ With important contributions from:
* Dino Mesa (INAF/OAPD): IFS pre-processing
* ESO personnel in general: SPHERE pipeline and calibration procedures

And bug reports with suggested fix from:
And small improvements, or bug reports with suggested fix from:
* Wolfgang Brandner (@Rumpelstil)
* Tomas Stolker (@tomasstolker)
* Karthikeyan Singaravelan (@tirkarthi)
* Chen Xie (@ChenXie-astro)
56 changes: 38 additions & 18 deletions examples/ifs_reduction.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,49 @@
import sphere.IFS as IFS

#####################################################################
# Starting in the present version 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
#

#%% init reduction
reduction = IFS.Reduction('/Users/avigan/data/sphere-test-target/IFS/', log_level='info')
reduction = IFS.Reduction('/Users/avigan/data/sphere-test-target/IFS/',
clean_start=True,
log_level='info',
user_config=None)

###############################################################################
# It is possible to provide a default INI 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/config.ini' #
# 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'
reduction.config['preproc_coadd_value'] = 2
reduction.config['combine_center_selection'] = 'first'
reduction.config['center_high_pass_waffle'] = True
reduction.config['clean'] = False
reduction.show_config()
print(reduction.config)

#%% reduction
reduction.full_reduction()
Expand All @@ -36,7 +53,10 @@
#

#%% init reduction
reduction = IFS.Reduction('/Users/avigan/data/sphere-test-target/IFS/', log_level='info')
reduction = IFS.Reduction('/Users/avigan/data/sphere-test-target/IFS/',
clean_start=True,
log_level='info',
user_config=None)

#%% sorting
reduction.sort_files()
Expand All @@ -61,8 +81,8 @@
reduction.sph_ifs_wavelength_recalibration(high_pass=True, offset=(-3, 0), plot=True)
reduction.sph_ifs_star_center(high_pass_psf=False, high_pass_waffle=True, offset=(-3, 0), plot=True)
reduction.sph_ifs_combine_data(cpix=True, psf_dim=80, science_dim=200, correct_anamorphism=True,
shift_method='interp', manual_center=None, coarse_centering=False,
save_scaled=False)
shift_method='interp', manual_center=None, center_selection='time',
coarse_centering=False, save_scaled=False)

#%% cleaning
reduction.sph_ifs_clean(delete_raw=False, delete_products=False)
reduction.sph_ifs_clean(delete_raw=False, delete_products=False, delete_config=False)
56 changes: 38 additions & 18 deletions examples/irdis_imaging_reduction.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,51 @@
import sphere.IRDIS as IRDIS

#####################################################################
# Starting in the present version 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
#

#%% init reduction
reduction = IRDIS.ImagingReduction('/Users/avigan/data/sphere-test-target/IRD/DBI/', log_level='info')
reduction = IRDIS.ImagingReduction('/Users/avigan/data/sphere-test-target/IRD/DBI/',
clean_start=True,
log_level='info',
user_config=None)

###############################################################################
# It is possible to provide a default INI 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/config.ini' #
# 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
reduction.config['combine_shift_method'] = 'fft'
reduction.config['combine_center_selection'] = 'first'
reduction.config['preproc_collapse_science'] = True
reduction.config['preproc_collapse_type'] = 'mean'
reduction.config['center_high_pass_waffle'] = True
reduction.config['clean'] = False
reduction.show_config()
print(reduction.config)

#%% reduction
reduction.full_reduction()
Expand All @@ -38,7 +55,10 @@
#

#%% init reduction
reduction = IRDIS.ImagingReduction('/Users/avigan/data/sphere-test-target/IRD/DBI/', log_level='info')
reduction = IRDIS.ImagingReduction('/Users/avigan/data/sphere-test-target/IRD/DBI/',
clean_start=True,
log_level='info',
user_config=None)

#%% sorting
reduction.sort_files()
Expand All @@ -57,8 +77,8 @@
#%% high-level science processing
reduction.sph_ird_star_center(high_pass_psf=True, high_pass_waffle=False, offset=(0, 0), plot=True)
reduction.sph_ird_combine_data(cpix=True, psf_dim=80, science_dim=200, correct_anamorphism=True,
shift_method='interp', manual_center=None, coarse_centering=False,
save_scaled=False)
shift_method='interp', manual_center=None, center_selection='time',
coarse_centering=False, save_scaled=False)

#%% cleaning
reduction.sph_ird_clean(delete_raw=False, delete_products=False)
reduction.sph_ird_clean(delete_raw=False, delete_products=False, delete_config=False)
32 changes: 27 additions & 5 deletions examples/irdis_spectro_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,30 @@
#

#%% init reduction
reduction = IRDIS.SpectroReduction('/Users/avigan/data/sphere-test-target/IRD/LSS/', log_level='info')
reduction = IRDIS.SpectroReduction('/Users/avigan/data/sphere-test-target/IRD/LSS/',
clean_start=True,
log_level='info',
user_config=None)

###############################################################################
# It is possible to provide a default INI 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/config.ini' #
# 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'
reduction.config['clean'] = False
reduction.show_config()
print(reduction.config)

#%% reduction
reduction.full_reduction()
Expand All @@ -20,7 +38,10 @@
#

#%% init reduction
reduction = IRDIS.SpectroReduction('/Users/avigan/data/sphere-test-target/IRD/LSS/', log_level='info')
reduction = IRDIS.SpectroReduction('/Users/avigan/data/sphere-test-target/IRD/LSS/',
clean_start=True,
log_level='info',
user_config=None)

#%% sorting
reduction.sort_files()
Expand All @@ -42,7 +63,8 @@
reduction.sph_ird_wavelength_recalibration(fit_scaling=True, plot=True)
reduction.sph_ird_combine_data(cpix=True, psf_dim=80, science_dim=300,
correct_mrs_chromatism=True, split_posang=True,
shift_method='fft', manual_center=None, coarse_centering=False)
shift_method='fft', manual_center=None, center_selection='time',
coarse_centering=False)

#%% cleaning
reduction.sph_ird_clean(delete_raw=False, delete_products=False)
reduction.sph_ird_clean(delete_raw=False, delete_products=False, delete_config=False)
24 changes: 22 additions & 2 deletions examples/sparta_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,24 @@
#

#%% init reduction
reduction = SPARTA.Reduction('/Users/avigan/data/sphere-test-target/SPARTA/', log_level='info')
reduction = SPARTA.Reduction('/Users/avigan/data/sphere-test-target/SPARTA/',
clean_start=True,
log_level='info',
user_config=None)

###############################################################################
# It is possible to provide a default INI 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/config.ini' #
# 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['misc_plot'] = True
Expand All @@ -19,7 +36,10 @@
#

#%% init reduction
reduction = SPARTA.Reduction('/Users/avigan/data/sphere-test-target/SPARTA/', log_level='info')
reduction = SPARTA.Reduction('/Users/avigan/data/sphere-test-target/SPARTA/',
clean_start=True,
log_level='info',
user_config=None)

#%% sorting
reduction.sort_files()
Expand Down
3 changes: 2 additions & 1 deletion examples/sphere_dataset.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import sphere.SPHERE as SPHERE

#%% init data set
ds = SPHERE.Dataset('/Users/avigan/data/sphere-test-target/', log_level='info')
ds = SPHERE.Dataset('/Users/avigan/data/sphere-test-target/',
log_level='info')

print('IRDIS reductions:')
for red in ds.IRDIS_reductions:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# setup
setup(
name='vlt-sphere',
version='1.5.1',
version='1.6,
description='Reduction and analysis code for the VLT/SPHERE instrument',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
Loading

0 comments on commit 4b3b096

Please sign in to comment.