Author Topic: BatchFormatConversion: how to do / how to set format hints / documentation  (Read 840 times)

Offline Peter S

  • Newcomer
  • Posts: 33
hello again,
I need to convert RAWs into FITS for a friend who canĀ“t open XISF (with APP).
default settings are: RAW cfa
...after that they appear as greyscale - so they need to be deBayered (?)

Is there a documentation concerning all the format hints / settings in BatchFormatConversion?
Peter

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
https://pixinsight.com/forum/index.php?topic=3118.0

and yeah RAW cfa means that the image should be saved as closely as possible as to how it came off the sensor - raw format with color filter array (bayer matrix). so the images need to be debayered.

one thing to look out for is the fits reader direction. if your friend's reader direction is backwards from how pixinsight writes the fits file, the bayer matrix pattern needs to be flipped.

rob

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
I assume that you are converting raw images from a DSLR camera. The input hint "raw cfa" will overrule the RAW Format Preferences. If you don't want that, delete the input hint (then the RAW Format Preference will apply) or replace the input hint.

Caution! When using the BatchFormatConversion script, the Bayer/mosaic pattern will NOT be stored in the FITS file.

When using the input hint 'raw cfa', the resulting FITS files contain the color information because they are CFA images. In order to convert them to RGB you will have to debayer.

The list from the link that Rob provided is probably outdated. An up-to-date compilation is available for different formats in the following way (cited from https://pixinsight.com/forum/index.php?topic=11281 ):

"The FormatExplorer window provides complete information on file format hints for all supported formats. Select a format on the left panel, then double-click the "implementation" item."

There is information for FITS, JP2, JPC, JPEG, RAW, TIFF and XISF format.

Bernd

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
whoops, thanks, missed the newer post

rob

Offline Peter S

  • Newcomer
  • Posts: 33
...thanks a lot!
...by the way: in this case (DSLR sensor, 16 bit) blackpoint is 1024.
Default setting in PixInsight (RAW format prefs) is RAW. RAW means "Black point correction: disabled".
- do you recommend this setting
or
- when during processing will this be relevant to tell PI
Peter

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Yes, RAW Format Preferences shall be set to 'Pure Raw' in order to perform the total image calibration on data in CFA format, and it is essential that black point correction is disabled.

Black point will be set during color calibration (to be specific: during background neutralization) of the integration, and later on when stretching the image.

Bernd

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
I assume that you are converting raw images from a DSLR camera...

Caution! When using the BatchFormatConversion script, the Bayer/mosaic pattern will NOT be stored in the FITS file.

This hitherto existing limitation has been fixed by the recent update, Pixinsight 1.8.8-4, and the updated BatchFormatConversion script version 1.4.0. Now images of digital camera raw formats will be converted to XISF format preserving the metadata as properties. Particularly important in this context is the bayer/mosaic pattern.

Also a bugfix of the debayer module was applied: the FITS keywords XBAYROFF and YBAYROFF are now parsed correctly with values in floating point format.

That means, raw files of digital cameras which are converted to XISF files will contain the correct bayer/mosaic pattern, and debayering with debayer/mosaic pattern set to 'AUTO' will yield the correct debayer result. The previous error message "*** Error: Unable to acquire CFA pattern information: Required image metadata not available." should not appear any more.

Bernd