This fusion algorithm provides tools to perform data fusion for astronomical images in the context of JWST new data releases. More specifically it combines hyperspectral image from NirSpec with the multispectral image from NirCam instrument to produce a new image both spatially and spectrally resolved. This algorithm is largery inspired by the fusion code developed by Claire Guilloteau. The details of the fusion procedure can be found in [1] and in [2].
In the repository you will find :
main.py
: launch the fusion algorithmCube.py
: pre-process the data images before the fusionFusion.py
: gather the regularisation-dependant methods of fusiontools.py
: inventory of small help functions. Imported inFusion.py
andCube.py
modulescreate_ConfigFile.py
: create the config.yaml, a yaml configuration file with all the parameters.
Before running main.py
, you should create or update a configuration file config.yaml in which all the important
parameters used in this code are stored. This configuration file can be created with the module create_ConfigFile.py
where we give the description of the parameters.
Then, the datacubes should be instantiated as Cube objects from Cube.py
in which all the needed preprocessing takes
place.
By construction, regularisation methods are class objects with a set of attributes and methods. They can be found in
Fusion.py
. The chosen regularisation method needs to be instantiated so that the fusion code is performed with the
embedded call method.
By default, this main will launch the weighted sobolev regularisation.
Imported in main.py
by:
from Cube import CubeHyperSpectral, CubeMultiSpectral
cubeHyperspectral = CubeHyperSpectral(YnirSpec, YnirCam,fact_pad, downsampling,fluxConv, PSF_HS, lacp)
cubeHyperspectral(Lh)
cubeMultiSpectral = CubeMultiSpectral(YnirCam, fact_pad, PSF_MS)
cubeMultiSpectral(cubeHyperspectral, Lm)
Imported in main.py
by:
from Fusion import Weighted_Sobolev_Regularisation
myFusion = Weighted_Sobolev_Regularisation(cubeMultiSpectral, cubeHyperspectral,
Lm, Lh,
PSF_MS, PSF_HS,
nc, nr,
outputDir,
mu)
myFusion()
This python script creates a configuration file with the help of PyYAML python library. Once a configuration file created,you only need to load it before launching the fusion algorithm.
[1] : C. Guilloteau, T. Oberlin, O. Berné, É. Habart, and N. Dobigeon “Simulated JWST datasets for multispectral and hyperspectral image fusion” The Astronomical Journal, vol. 160, no. 1, p. 28, Jun. 2020.
[2] : C. Guilloteau, T. Oberlin, O. Berné, É. Habart, and N. Dobigeon "Hyperspectral and Multispectral Image Fusion Under Spectrally Varying Spatial Blurs – Application to High Dimensional Infrared Astronomical Imaging" IEEE Transactions on Computatonal Imaging, vol.6, Sept. 2020.