Fits viewver in python

I’m new and learning python ( and i’m an amateur astrophotographer). In order to improve my progamming skill in python, i decided for my first project to try to implement a ( very basic) fits viever based on a gui library ( probably customtkinfra ). Its not going to be anything “scientific relevant”, just a very basic viever just to learn about python and astropy, and see how far I can go.

At moment im reading a loot about astropy and the fits standard, and the first thing i noticed is that ( understandably ) most of astropy documentation refers to mono images. Since i use an OSC camera ( based on a imx571 sensor, like the asi2600 ) i understood i need to debayer it and looks like there are no funzions in astropy for that. Is that correct?

Another thing i noticed is that the pictures i take are always datacubes::

Filename: ./test2.fits
No. Name Ver Type Cards Dimensions Format
0 PRIMARY 1 PrimaryHDU 49 (6224, 4168, 3) float32

I’m trying to read the documentatrion of the fits standard, and i uderstood thath there can be 1to 999 “layers”, but i’m not sure hot to interpret them and that’s the logic behind. the fact that my images have exacly 3 layers ( why not 1? or 4 or 10? ). Should I just stack the 3 “layers” and then debayer it ( maybe using CV2 ) ?

Thanks in advance,

Dear Salvatore,
the AAVSO DSLR observers manual has some helpful information on the format of DSLR images.
Digital Single Lens Reflex (DSLR) Camera Observing Manual | aavso

You have an image cube because the software that has converted the images to FITS format has put the data for R, G and B pixels into separate 2-d images and packaged them up as a data cube. How you deal with these will depend on what you want to measure.


1 Like