user29A / JPFITS

FITS File interaction written in Visual Studio C# .Net. JPFITS is not based on any other implementations and is written from the ground-up, consistent with the FITS standard, designed to interact with fits files as object-oriented structures. See the github Wiki link below for more info.
https://github.com/user29A/JPFITS/wiki
17 stars 1 forks source link

Change CFA array pattern? #1

Closed JeremyLikness closed 2 years ago

JeremyLikness commented 2 years ago

Hi, just found this excellent library - thank you! I'm digging through now but might save some time with someone more familiar. I have a tool for organizing image files and right now am using a Python script to change the CFA pattern. Is that possible in a straightforward way via the JPFITS APIs?

user29A commented 2 years ago

Hi Jeremy!

Sorry, I am not picking up on what "CFA" means...slow morning, no coffee for me yet perhaps?

If the functionality you need isn't there already, I can code it in for you no problem probably.

Also be sure to check the CCDLAB FITS image app linked on my user profile...maybe that would help too.

Anyway, let me know what CFA means? Cheers,

Joe

JeremyLikness commented 2 years ago

I'll take a look at the app, thanks. CFA = color filter array. Sensor data from CCD is stored in an array, so for example this:

RGRGRG
GBGBGB

Would be an RGGB array with 3 pixels. After the telescope passes the meridian, it may flip to:

BGBGBG
GRGRGR

Or a BGGR array.

https://en.wikipedia.org/wiki/Color_filter_array

user29A commented 2 years ago

OK I see. No the CCDLAB app won't do that part as it is mainly for single-channel or single-filter images where the pixels do not need to be reordered.

However what you're explaining above seems trivial enough to code, and should be able to be coded parallelized for maximum speed.

So that's the ordering of the pixels in the array, and you'd like to re-order the pixels?

If you like, send me a sample FITS image, and write the basic algorithm you would like to see performed, and I can write it into the package, etc.

For example, you have an array with pixel ordering

RGRGRG GBGBGB

but you'd like to switch the ordering of the pixels to

BGBGBG GRGRGR

(or the reverse of that, or some general ordering)?