astropy / astropy/ccdproc

Counts are too High Compared to Linux IRAF and 3 Images in a Single Fits File

Open
#806 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
93
Forks
92
Avg merge
14h 44m
Merged PRs (30d)
30

Description

When combining bias, flats, or darks together into a master image, the resulting counts per pixel is on average a lot higher using `ccdproc` than the `Linux` counter part.

It's actually only like 10 counts higher between the master bias images, but for the master flats there is a 12k-20k count difference (more counts in the Python version vs. the Linux version). I have uploaded some example master files [here](https://github.com/kjkoeller/EclipsingBinaries/tree/main/EclipsingBinaries/examples/master_files) (GitHub page) and test calibration images [here](https://github.com/kjkoeller/EclipsingBinaries/tree/main/EclipsingBinaries/examples/calibration_images). The other weird thing is, is that the file size between the Linux version and Python. The Linux version is about 4x smaller than the Python corresponding versions.

I am not sure if this is supposed to happen either, but when I open the `fits` files that are outputted from the Python version, it shows three separate images within the master flat file (same type of thing for bias, darks, and science images).

The first image is the master flat, the second image is an image of all 0 count pixel values, and the third is not even a single flat image but maybe a mask?

![Screenshot 2023-05-08 100510](https://user-images.githubusercontent.com/87211363/236845479-3016202e-4063-42aa-8461-aca3f3aecfdc.png)
![Screenshot 2023-05-08 100532](https://user-images.githubusercontent.com/87211363/236845499-fd811d07-c04e-47ae-8ee4-f8e57d91f89e.png)
![Screenshot 2023-05-08 100552](https://user-images.githubusercontent.com/87211363/236845506-3569d514-55f1-4c8b-a81d-9bca1f12a15f.png)

### Versions

Python version: 3.9
Astropy version: 5.1.1 have also tried 5.2.2
Numpy version: 1.22.3
Pyerfa version: 2.0.0.1
Scipy version: 1.9.3
Matplotlib version: 3.5.1

Contributor guide

Open the contributing guide

Research direction

Reproduce the ccdproc calibration workflow using the linked test calibration images and compare its master files with the Linux IRAF outputs. Inspect the generated FITS files and their three image sections, then determine whether the count and file-size differences are expected or indicate a processing or output bug. Use the reported Python, Astropy, NumPy, PyERFA, SciPy, and Matplotlib versions when comparing results.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.