Metadata-Version: 2.4
Name: clifspy
Version: 0.0.1
Summary: Data processing for Coma Legacy IFU Survey
Author-email: Ian Roberts <ianr@uwaterloo.ca>
License: MIT License
        
        Copyright (c) 2024 Ian Roberts
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/iandroberts/clifspy
Project-URL: Issues, https://github.com/iandroberts/clifspy/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: astropy
Requires-Dist: numpy
Requires-Dist: spectral-cube
Requires-Dist: toml
Requires-Dist: matplotlib
Requires-Dist: tqdm
Requires-Dist: photutils
Requires-Dist: sdss-mangadap
Dynamic: license-file

# clifsPy

This is a data analysis and processing package for the Coma Legacy IFU Survey. This package permits the combination and processing of *Level 1* data cubes from the WEAVE spectrograph.

The standard pipeline run includes the following analysis steps:

### Cube pre-processing and combination
- Apply flux calibration
- Spectral and spatial binning (optional)
- Background subtraction (optional)
- Combine blue and red level 1 cubes
- Fix WCS (optional)

### Multi-wavelength
- Make multi-wavelength cutout images from available ancillary data
- Currently supported: GALEX, DESI Legacy, CFHT, Herschel, LOFAR
- Make integrated CO spectrum (optional, IRAM or ALMA)

### MaNGA Data Analysis Pipeline
This module makes use of the [MaNGA data analysis pipeline](https://sdss-mangadap.readthedocs.io/en/latest/) ([Westfall et al. 2019](https://ui.adsabs.harvard.edu/abs/2019AJ....158..231W/abstract))
- Push the calibrated WEAVE data cubes through the MaNGA data analysis pipeline (DAP)
- Custom class in order to format the WEAVE data suitably for entry into the MaNGA DAP
- DAP performs full spectral fitting, outputs maps of: stellar kinematics, emission line flux, gas kinematics, absorption line indices, etc.

### Products
- Creates value-added products outside of what is produced by the MaNGA DAP
- Currently includes star formation rate and stellar mass maps
- More to be added...

### Plotting
- Creates diagnostic plots to evaluate the performance of the MaNGA DAP run

## Usage
The package is centered around the `clifsipe` command, which takes a CLIFS ID value as input.  All of the standard pipeline steps can be run as:
```
clifspipe $clifs_id --default_run
```
It can also be used in a modular fashion, for example to only run the initial data cube processing:
```
clifspipe $clifs_id --process_cube
```
Or to just run the MaNGA DAP and make the diagnostic plots:
```
clifspipe $clifs_id --manga_dap --make_plots
```
The pipeline expects to find two configuration files in a `config_files` directory.  One, `clifs_{$clifs_id}.toml` that sets various options and file paths for the pipeline run, and a second configuration file for the MaNGA DAP, the filename of which is set in the CLIFS ID configuration file. Examples of both files can be found in `examples/`

## Required packages
- `astropy`
- `matplotlib`
- `numpy`
- `photutils`
- `sdss-mangadap`
- `spectral-cube`
- `toml`
- `tqdm`

## Installation
```
pip install clifspy
```
