Author Topic: Losing Keywords in SubframeSelector  (Read 4243 times)

Offline johnpane

  • PixInsight Enthusiast
  • **
  • Posts: 93
Losing Keywords in SubframeSelector
« on: 2016 January 05 20:04:23 »
Hi,

I am having difficulty with SubframeSelector.

I used BatchDebayer on a series of CR2 files from a Canon 7D Mark II camera. The resulting files have a series of FITS keywords, including DATE-OBS.

When I load them into SubframeSelector, the Date-Time column is empty. Accepted files, written by SubframeSelector with the Copy operation, lack all of the keywords, including DATE-OBS.

Screen shots attached. I am running 1.8.4.1195 and just checked for updates -- none.

Probably I am doing something wrong but I cannot figure it out.

Thanks,
John

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: Losing Keywords in SubframeSelector
« Reply #1 on: 2016 January 05 20:52:49 »
Hi John,

The copy should have the same extension. Your example the extensions mismatch and also the _a file has an earlier modification time.

I double checked that keywords are copied properly on Mac OS X 1195, for both .xisf and .fit inputs.

Maybe you could double check the keywords in your inputs, and rerun the script placing the copies in a different directory to avoid possible confusion?

Thanks,
Mike


Offline johnpane

  • PixInsight Enthusiast
  • **
  • Posts: 93
Re: Losing Keywords in SubframeSelector
« Reply #2 on: 2016 January 06 00:16:49 »
Thank you Mike. I reproduced the exact problem again, being careful not to confuse file. BatchDebayer produced an .xisf file with the correct keywords and SubframeSelector produced a .fit file without the keywords. I do not see a setting in SubframeSelector to choose the output file type. (Note, the timestamp differences were because I took the screen shots at different points in my diagnostic process.)

Apparently this was a preferences corruption problem. This was also evident in the tiny top pane of the File Explorer. I reset my preferences and now SubframeSelector produces an .xisf file and the keywords are preserved.

Thank you again for your time.

John

Offline johnpane

  • PixInsight Enthusiast
  • **
  • Posts: 93
Re: Losing Keywords in SubframeSelector
« Reply #3 on: 2016 January 06 01:04:12 »
I spoke too soon. After that test, I reran SubframeSelector again, without changing any parameters except the output weight keyword and SubframeSelector generated debayer_a.fit files that did not preserve the FITS keywords!

The bug occurs iff you have a weight keyword!

Offline johnpane

  • PixInsight Enthusiast
  • **
  • Posts: 93
Re: Losing Keywords in SubframeSelector
« Reply #4 on: 2016 January 06 04:55:14 »
I see the problem in SubframeSelector.js.

Starting at line 1944 is a section of code for writing files if the weightKeyword is not specified.
Starting at line 1998 is a different section of code for if the weightKeyword is present. This on line 2000 seems to be clue why a .fit file is created even if the source image was an .xisf file:
            makeApprovedSubframeFilePath(filePath, ".fit") :

Also, in SubframeSelectorReadWriteImage, line 341 seems to force .fit file format.

As for why the existing keywords don't make it into the output file. Maybe the try section of SubframeSelectorReadWriteImage starting at line 324. It seems to only read the keywords if the input file has the .fit extension.

I haven't explored why the DATE-OBS data doesn't make it into SubframeSelector's table.

Based on the above, a workaround might be for me to specify that BatchDebayer should output .fit files instead of .xisf files. I haven't tested that yet.

John

Offline johnpane

  • PixInsight Enthusiast
  • **
  • Posts: 93
Re: Losing Keywords in SubframeSelector
« Reply #5 on: 2016 January 06 05:41:06 »
I can now confirm that converting the debayered files to .fit format results in:
a) Date/Time now appears in SubframeSelector table
b) Keywords are preserved in the output file, even when there is a weight keyword included.

John

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: Losing Keywords in SubframeSelector
« Reply #6 on: 2016 January 06 06:41:55 »
Hi John,

Sorry for the trouble and thank you for the diagnosis. I will work on fixes.

Regards,
Mike

Offline Greg Schwimer

  • PixInsight Addict
  • ***
  • Posts: 210
Re: Losing Keywords in SubframeSelector
« Reply #7 on: 2016 January 14 21:46:55 »
+1 on this. SFS was not adding the weight keywords in .xisf files. My last batch was all .fits and it seemed to just work.
- Greg
Scottsdale, Arizona, USA

Offline Sebastiano

  • Newcomer
  • Posts: 14
Re: Losing Keywords in SubframeSelector
« Reply #8 on: 2016 September 12 16:51:25 »
I confirm that: SubframeSelector can't add the right Weight value in xisf headers.
Takahashi FSQ-106EDX3
FLI Atlas Focuser
QSI 683 wsg-8
Astrodon E-Series Gen2 LRGB + H-alpha 5nm + O-III 5nm, 31mm unmounted
SX Lodestar X2
Paramount MyT
Geoptik Hercules 95
Lenovo X1 Carbon

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Losing Keywords in SubframeSelector
« Reply #9 on: 2019 June 29 21:57:56 »
Has this ever been fixed?  Seem to be having this problem in 2019. 
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Losing Keywords in SubframeSelector
« Reply #10 on: 2019 June 29 23:33:40 »
Please note that this thread is from 2016 and refers to the SubframeSelector script, when the SubframeSelector tool didn't yet exist. This problem has not been reported elsewhere so I think it was fixed with an update to the script long time ago. Are you using the script or the process?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jerryyyyy

  • PixInsight Old Hand
  • ****
  • Posts: 425
    • Astrobin Images
Re: Losing Keywords in SubframeSelector
« Reply #11 on: 2019 June 30 07:31:47 »
Yes, I recall this now... was using the script.  Thanks... into some heavy duty processing so pulling out all the tricks. 
Takahashi 180ED
Astrophysics Mach1
SBIG STT-8300M and Nikon D800
PixInsight Maxim DL 6 CCDComander TheSkyX FocusMax