Metadata-Version: 2.1
Name: pygsfit-cp
Version: 0.1.4
Summary: A python wrpper of the core fitting functionalities of gsFit.
Author: Yuqian Wei
Author-email: yw633@njit.edu
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy (>=1.25.0)
Requires-Dist: astropy (>=6.0.0)
Requires-Dist: dask (>=2024.3.0)
Requires-Dist: h5py (>=3.6.0)
Requires-Dist: matplotlib (>=3.8.2)
Requires-Dist: scipy (>=1.12.0)
Requires-Dist: sunpy (>=5.1.1)

# pygsfit_cp

`pygsfit_cp` is a radio imaging spectroscopy package dedicated to performing spectrum fitting. 
### INSTALLATION:
### New conda/virtual env (highly recommanded) please replace myenv with a desired name
`conda create --name myenv`
`conda activate myenv`
`pip install pygsfit_cp`

### USAGE:
Step1: There are two ways to do step 1. 
## Method One (Recommended)

a. **Initial Setup and Exploration**
   - Run `/demo/pygsfit_cp.ipynb` to identify appropriate initial gas parameters and fitting ranges for each parameter.
   - Define and visualize the Region of Interest (ROI).

b. **Export Batch Script**
   - After obtaining the ideal fitting results, export a batch mode fitting script to perform the fitting with the same parameters.

## Method Two

a. **Direct Batch Mode**
   - If you are already familiar with your data, directly run `/demo/batch_mode_script.py`.
   - Manually input all the parameters of the ROI.

## Common Steps for Both Methods

2. **Execute Batch Script**
   - Execute the batch script to obtain the fitting results, which include:
     - A results file (`fitting_results.h5`)
     - An IDL script (`make_params_maps.pro`)
     - Several intermediate files.

3. **Generate Parameter Maps**
   - Run the IDL script (`make_params_maps.pro`) directly in `sswidl` to generate an IDL save file (`parameters_map.sav`).
   - The resulting save file can be opened in `gsfitview`, `sswidl`.


