Author Topic: Can Raw Bayer CFA format hint be set from PJSR?  (Read 4981 times)

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Can Raw Bayer CFA format hint be set from PJSR?
« on: 2015 July 01 16:32:06 »
Hi,

I'm working on a script that calculates DSLR sensor parameters and reports on how dark current increases from exposure to exposure.

However, for this to work properly, it is essential that the raw files are loaded as Raw Bayer CFA monochrome.  I can't find any obvious way to do this if the user has already set a different option using DSLR_RAW in Format Explorer.  I'm using ImageWindow.Open to open the files but I can't find any way to specify the Format Hints referred to in this post: http://pixinsight.com/forum/index.php?topic=3118.0

The script output looks like this:

=============================
DSLR Sensor Parameters v0.0.1
=============================
Camera: Canon EOS 350D DIGITAL
ISO speed: 800
Image Size: 3474 x 2314
Bias frames exposure time: 1/4000 sec
Flat frames exposure time: 1/15 sec
Dark frames exposure time: 305 sec
Channel order:             [RGGB]
Gain per channel(e/ADU):   [ 1.151, 1.101, 1.113, 1.113 ]
ISO for unit gain:         [ 695, 727, 719, 719 ]
Read Noise(e):             [ 5.5, 5.28, 5.42, 5.47 ]
Dark Current (e/pixel/sec) [ 0.133, 0.1271, 0.1247, 0.1256 ]
Dark Current (e/pixel/sec) [ 0.1715, 0.1629, 0.1593, 0.1626 ]
Dark Current (e/pixel/sec) [ 0.2039, 0.1861, 0.2144, 0.1932 ]
Dark Current (e/pixel/sec) [ 0.2338, 0.2149, 0.2443, 0.2837 ]
Dark Current (e/pixel/sec) [ 0.2677, 0.2435, 0.2517, 0.2563 ]
Dark Current (e/pixel/sec) [ 0.2971, 0.2748, 0.2756, 0.3451 ]
Dark Current (e/pixel/sec) [ 0.3234, 0.3035, 0.3007, 0.3158 ]
Dark Current (e/pixel/sec) [ 0.3461, 0.3216, 0.3236, 0.3427 ]
Dark Current (e/pixel/sec) [ 0.368, 0.3433, 0.3447, 0.415 ]
Dark Current (e/pixel/sec) [ 0.391, 0.3665, 0.3663, 0.4315 ]


If it helps, I attach the script here (with txt suffix instead of js)


Mark

Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Can Raw Bayer CFA format hint be set from PJSR?
« Reply #1 on: 2015 July 01 22:05:38 »
check BatchPreProcessing-engine.js - you can see that a method is defined which returns a string comprising of all the input hints, then called like so:

 var d = f.open( filePath, this.inputHints() );

rob

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 241
    • Mark Shelley Astrophotography
Re: Can Raw Bayer CFA format hint be set from PJSR?
« Reply #2 on: 2015 July 01 22:36:45 »
Excellent - thanks!

Mark
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Can Raw Bayer CFA format hint be set from PJSR?
« Reply #3 on: 2015 July 06 00:46:03 »
Hi Mark,

Actually, you should be using the "raw cfa" input hints in your script. This will ensure that raw CFA data are loaded unaltered as grayscale images, irrespective of user settings.

I look forward to your script. Please let me know if you need more information, or if you have more questions. Sorry for the slow response; I have been absolutely overwhelmed working on the next version of PixInsight (perhaps the most difficult and complex release since I began working on PixInsight in 2003).
Juan Conejero
PixInsight Development Team
http://pixinsight.com/