Metadata-Version: 2.4
Name: qbd
Version: 0.1.2.post5
Summary: Creates data cubes from FITS-file image data.
Project-URL: Homepage, https://qbd.lennartheino.de
Project-URL: Issues, https://github.com/idia-astro/qbd/issues
Author: L. Heino
License-Expression: GPL-3.0-or-later
License-File: LICENSE
License-File: LICENSE.LESSER
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >3.9
Requires-Dist: astropy>6.0.0
Requires-Dist: click>8.0.0
Requires-Dist: numpy>=1.23.2
Requires-Dist: rich>12.0.0
Description-Content-Type: text/markdown

# Installation
 
``` bash
pip install qbd
```
# Running `qbd`

## 1. Create demo data
Run the `qbd` command with the `--create-demo-data` flag to create the directory
`channels` with FITS demo data.
```bash
qbd --create-demo-data
Writing file: channels/demo-channel-001.fits
Writing file: channels/demo-channel-002.fits
Writing file: channels/demo-channel-003.fits
Writing file: channels/demo-channel-006.fits
Writing file: channels/demo-channel-007.fits
```

## 2. Create input file list
Create a simple text file containing the filepaths to input the channel data.
```bash
find channels/*.fits > channel-list.txt
```

```bash
cat channel-list.txt
channels/demo-channel-001.fits
channels/demo-channel-002.fits
channels/demo-channel-003.fits
channels/demo-channel-006.fits
channels/demo-channel-007.fits
```

## 3. (Optional) Add empty channels
Add empty channels (filled with np.nan) by adding an empty lines in channel-list.txt:
```bash
cat channel-list.txt
channels/demo-channel-001.fits
channels/demo-channel-002.fits
channels/demo-channel-003.fits


channels/demo-channel-006.fits
channels/demo-channel-007.fits
```

## 4. Start cube creation
Start the data cube creation by calling the `channel-list.txt` with `qbd`.
```
qbd channel-list.txt
Creating empty cube: cube.fits
Processing channel 1/7: channels/demo-channel-001.fits
Processing channel 2/7: channels/demo-channel-002.fits
Processing channel 3/7: channels/demo-channel-003.fits
Processing channel 4/7: Empty channel. Setting NaN.
Processing channel 5/7: Empty channel. Setting NaN.
Processing channel 6/7: channels/demo-channel-006.fits
Processing channel 7/7: channels/demo-channel-007.fits
Cube filled: cube.fits
```
