Author Topic: DSLRs, dark flats, and BatchPreprocessing  (Read 2612 times)

Offline M Covington

  • Member
  • *
  • Posts: 65
DSLRs, dark flats, and BatchPreprocessing
« on: 2018 January 01 18:22:36 »
I use DSLRs and take lights, darks, flats, and flat darks (not bias frames, although bias frames and dark flats are indistinguishable when the exposure time is something like 1/200 second, as mine are).

The BatchPreprocessing script seems to work fine when I put in the flat darks as bias frames.  I see from the log that the flats are calibrated with the regular darks (the darks that match my lights), which are scaled down by your noise analysis algorithm.

But I think I get even better results if I put some of my flat darks in as darks (and the rest as bias).  Because of the exposure time, they become a separate group of darks from the regular darks, and they are used to calibrate the flats.

BatchPreprocessing won't let me put the same files in more than one category.  However, I'm thinking of hacking it to add a checkbox, "Bias frames are flat darks," which would tell it to dark-subtract the flats using the master bias rather than the master dark.

A couple of questions about this...

(1) Am I on the right track here?  Should it work better that way?

(2) If I make the modified version of BatchPreprocessing, will I be free to distribute it?  Of course I can use anything for my own purposes, but I'm in the process of revising Digital SLR Astrophotography and want to give my readers a quick introduction to PixInsight, of which this might be part. 

If nothing else, I want to give good advice about how to use BatchPreprocessing in this situation.

Thanks in advance to those who are about to give helpful responses!

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: DSLRs, dark flats, and BatchPreprocessing
« Reply #1 on: 2018 January 01 19:42:36 »
Why don't you run BPP twice: once to build the master flat(s) and a second time to calibrate and register the lights?  That way you can calibrate the flats differently from the lights.

Cheers,
Rick.

Offline M Covington

  • Member
  • *
  • Posts: 65
Re: DSLRs, dark flats, and BatchPreprocessing
« Reply #2 on: 2018 January 01 20:10:50 »
Because I'm a computer programmer, and if I know exactly what I want to do in advance, I want to automate it :)

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: DSLRs, dark flats, and BatchPreprocessing
« Reply #3 on: 2018 January 01 20:43:17 »
I'm a computer programmer too, or at least I was, but I'm the lazy type ;)

Offline M Covington

  • Member
  • *
  • Posts: 65
Re: DSLRs, dark flats, and BatchPreprocessing
« Reply #4 on: 2018 January 03 20:07:12 »
OK, some results.

I have modified the BatchPreprocessing script to add a checkbox, "Use bias frames as flat darks," which, when checked, causes the flats to be dark-calibrated against the (so-called) bias frames rather than against the (heavily rescaled) regular darks.

The calibration seems to be a wee tiny bit more accurate, although it's hard to tell.

I hope the developers of PixInsight will pop up here and tell me:

- Is this on the right track?

- Any interest in having the modified version as a submission?  If not, may I distribute it (free)?

I changed the VERSION field in it, adding a short note that it's modified, so it won't be mistaken for any version of the original.

Offline M Covington

  • Member
  • *
  • Posts: 65
Re: DSLRs, dark flats, and BatchPreprocessing
« Reply #5 on: 2018 January 04 19:29:49 »
After trying it out further, I decided to let it loose upon the world.

https://pixinsight.com/forum/index.php?topic=11992.0