Author Topic: Star Alignment Bug?  (Read 5815 times)

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Star Alignment Bug?
« Reply #15 on: 2018 February 22 21:05:12 »
      Some further experimentation with StarAlignment showed that it works fine to register the old camera's raw FITS files to the new camera's reference c_cc_r.xisf file, but the vertical mirror reflection occurs when I use StarAlignment (same settings, doesn't matter if distortion correction or drizzle generation are on/off) on either the old or new camera's unregistered but calibrated c_cc.xisf files.  It seems that StarAlignment introduces this vertical mirror reflection whenever it tries to register c_cc.xisf files, in general, although it works fine on the same files when they are raw FITS.   

     The same thing happens when you try to register _c.xisf files so the conclusion seems to be that StarAlignment won't register the calibrated c.xisf frames, new or old without introducing the vertical mirror reflection, but does fine on the same images as uncalibrated FITS files, new or old.   This seems to be a bug in StarAlignment.

     I tried to attach 3 files to see if other people can reproduce this wierd behavior of StarAlignment but they are much too large to post:
1) the new reference image:  ...45_c_cc_r.xisf
2) an old raw FITS file:  ...48.fit
3) image 2) after its original calibration and cosmetic correction:  ...048_c_cc.xisf

Thanks,
Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Star Alignment Bug?
« Reply #16 on: 2018 February 22 22:27:47 »
you'll have to upload them to dropbox or google drive or onedrive and post the link here...

rob

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: Star Alignment Bug?
« Reply #17 on: 2018 February 23 01:38:31 »
Jeff,

Quote
This seems to be a bug in StarAlignment.
It's very unlikely that your issue is a bug in StarAlignment - that would have been found and fixed long before.

By now I suppose that Mike was correct when he wrote:
It's also possible that during one of these 2 processing sessions that the Fits parameters had a different coordinate origins settings than the other.

You can easily check that: load a raw FITS file of your old camera into Pixinsight and the (old) calibrated version of the same file. Are they vertically mirrored?

Alternatively, please upload the files and we'll see.

Bernd

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Star Alignment Bug?
« Reply #18 on: 2018 February 26 21:56:42 »
Thanks, Rob, Bernd-

I've uploaded the three files listed previously to Google Mydrive with the links indicated here:

1) the new reference image:  ...45_c_cc_r.xisf

https://drive.google.com/open?id=11eBu35QRHNSV7MyL5DGI5sQr7MZ2bcVW

2) an old raw FITS file:  ...48.fit

https://drive.google.com/open?id=1BKaVOXPf8JmHljPeh7_DVCBPUG5PBfCB

3) image 2) after its original calibration and cosmetic correction:  ...048_c_cc.xisf

https://drive.google.com/open?id=1g-h8Q_cllP15_A7vdhms8mRav-uTDU6z

No, I have checked that the old camera's FITS [file 2) above] and the old calibrated c_cc.xisf file are not mirrored but the same orientation.

Be good to know if this behavior is reproducible; i.e., that with File 1) as Reference in StarAlignment,  the FITS file 2) will register correctly, but the calibrated file 3) is vertically mirrored.

CS/Jeff

----------
Actually, having uploaded these files, I retested and find a different behavior.  StarAlignment now simply fails with BOTH files 2) and 3), but works correctly if I apply a horizontal mirror to both files 2) and 3) before running StarAlignment.   I have no idea what changed but I still have a StarAlignment problem only now it is different than how it was described above. 

« Last Edit: 2018 February 26 22:26:48 by jeffweiss9 »
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: Star Alignment Bug?
« Reply #19 on: 2018 February 27 02:54:30 »
Jeff,

thank you for uploading the files. My setting in Format Explorer|FITS for 'Coordinate origin' is the default, 'Upper left corner (up-bottom)'. When I open the ...48.fit file (#2), the orientation is correct, because the spiral arms turns anticlockwise (viewing from the center, outwards). The same (correct) orientation is in the image ...48_c_cc.xisf (#3).

Image ...45_c_cc_r.xisf (#1) is mirrored.

Please take a look at your current setting of 'Coordinate origin' in Format Explorer|FITS and disclose it.
Please upload a FITS file of your new camera as well, perhaps ...45.fit.

I don't want to speculate anymore, so I won't make any suggestions at the moment, but surely we will clarify this issue!


Bernd

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Star Alignment Bug?
« Reply #20 on: 2018 February 27 03:01:12 »
Hi Jeff,

Your 2) and 3) images are horizontally mirrored with respect to 1). This is not supported by the default star matching device used by StarAlignment, which is based on polygon descriptors. To align these files:

- Open the StarAlignment tool.

- Open the Star Matching section.

- Select triangle similarity as the descriptor type parameter. Please read the tool tip information given for this parameter, where you'll find detailed information.

The BatchPreprocessing script forces triangle similarity by default to ensure that these problems are always avoided. However, polygon descriptors are used by default in SA because they are much better in terms of distortion modeling and robustness under difficult conditions. Their lack of support for mirrored images is of marginal importance in most practical applications.

Besides these restrictions, I see no bug in the StarAlignment process that can be identified with these images.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Star Alignment Bug?
« Reply #21 on: 2018 February 27 03:28:45 »
...I admit that I really did not look for it in the process group called 'Fast rotation', for mirroring is not a rotation

Generalizing, rotations and reflections on the plane can be represented as rotations in three-dimensional space. Rotations and reflections are very similar plane isometries. For discrete images, horizontal and vertical mirroring transformations are algorithmically very similar to 90/180 degree rotations: they can be implemented as a series of fast exchange and copy operations involving no arithmetic calculations. That's why I grouped all of them in the same FastRotation tool. Admittedly, not a very intuitive grouping, but perfectly sound from a computer geek's perspective :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: Star Alignment Bug?
« Reply #22 on: 2018 February 27 04:10:16 »
Hi Juan,

I am pretty sure as well that there is no bug in the StarAlignment process. It is completely clear (from general examinations of symmetry) that astro images cannot be aligned with their mirror image, if you remain in 2 dimensions (in the plane).

The problem occurred when Jeff wanted to align images of his old and new camera. He recognized that images of the old and of the new camera are mirrored to one another.

Whether the mirroring is horizontal or vertical is not relevant at all: one orientation is correct (true-sided), the other is wrong (mirrored). Viewing the galaxy NGC 2403 with known direction of rotation of the spiral arms it became clear that the old camera yielded the correct orientation and the new camera the wrong one.

I wanted to help in order that the images of the new camera are represented true-sided. Since Jeff does not use his old camera anymore, his problems will vanish once the settings of 'Coordinate origin' in Format Explorer|FITS are adjusted properly.

Quote
Generalizing, rotations and reflections on the plane can be represented as rotations in three-dimensional space. Rotations and reflections are very similar plane isometries. For discrete images, horizontal and vertical mirroring transformations are algorithmically very similar to 90/180 degree rotations: they can be implemented as a series of fast exchange and copy operations involving no arithmetic calculations. That's why I grouped all of them in the same FastRotation tool. Admittedly, not a very intuitive grouping, but perfectly sound from a computer geek's perspective :)
Yes, I understand that the term 'fast' is well suited. Forgive me that I was finical - I'm a chemist and in chemistry, symmetry operations play a very important role for the properties of molecules. I have no problem with the naming.

Bernd
« Last Edit: 2018 February 27 04:47:09 by bulrichl »

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Star Alignment Bug?
« Reply #23 on: 2018 March 18 21:48:53 »
Hi Jeff,

Your 2) and 3) images are horizontally mirrored with respect to 1). This is not supported by the default star matching device used by StarAlignment, which is based on polygon descriptors. To align these files:

- Open the StarAlignment tool.

- Open the Star Matching section.

- Select triangle similarity as the descriptor type parameter. Please read the tool tip information given for this parameter, where you'll find detailed information.

The BatchPreprocessing script forces triangle similarity by default to ensure that these problems are always avoided. However, polygon descriptors are used by default in SA because they are much better in terms of distortion modeling and robustness under difficult conditions. Their lack of support for mirrored images is of marginal importance in most practical applications.

Besides these restrictions, I see no bug in the StarAlignment process that can be identified with these images.

Juan-         REVISED
   Thanks very much.  Finally was able to get back to this. You are indeed correct that changing the default 'pentagon' descriptor to 'triangle similarity' enabled StarAlignment to handle the horizontal mirroring of my old images just fine.   That is not any bug.

   However, going beyond StarAlignment, Local Normalization and ImageIntegration, I find that DrizzleIntegration then has some kind of quirky behavior.  For some reason, DrizzleIntegration wants to use the unregistered c_cc.xisf files rather than (or in addition to?) the c_cc_r.xisf files. This seems strange to me because I can't understand why it is trying to integrate unregistered files.  That doesn't sound correct.
   To compound the problem,  it is asking for c_cc.xisf files on the wrong disk (from an old machine as this work had to be spread across two machines), while the correct c_cc.xisf files (still unregistered) are found in the same directory as the c_cc_r.xisf and c_cc_r.drz files.  I have no idea where the memory of the original disk drive (written by BatchPreProcessing script) is coming from (couldn't find it in the headers).  Is it correct that DrizzleIntegration needs the unregistered c_cc files for something and, if so, is there any way that I can specify the drive and directory where they are found -- replacing the wrong locations that DrizzleIntegration is coming up with? 
-Jeff
« Last Edit: 2018 March 22 21:30:38 by jeffweiss9 »
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Star Alignment Bug?
« Reply #24 on: 2018 March 27 12:48:19 »
Any suggestions on why DizzleIntegration is asking for unregistered cc_c.xisf files instead of registered cc_c_r.xisf files?
This is happening in trying to combine the old ML8300 images with the new ML16200 images.  Standard Integration worked fine, only DrizzleIntegration is doing this.
Thanks,
R/Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline jpaana

  • Newcomer
  • Posts: 13
Re: Star Alignment Bug?
« Reply #25 on: 2018 March 27 13:15:59 »
Drizzle files include the transform made when the original file has been registered, so drizzle integration instead combines this and the drizzle scaling operation into one and transforms original files directly thereby avoiding quality loss coming from transforming already transformed (registered) data.

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Star Alignment Bug?
« Reply #26 on: 2018 March 27 22:10:43 »
jpaana-
Thanks.  That makes sense. But then my actual problem then is that PI 1.8.05 is asking for the cc.c.xisf files on the wrong disk drive because they are no longer on the drive where they were created - since it crashed.  PI doesn't seem to offer the user to browse to find those original c.cc.xisf files.    This is all part of this problem of reregistering old files from one camera to another reference from a new camera.  I think PI should offer a browse option if it doesn't find the files it is looking for where they were when the files were generated in 2015.  With the help of folks above, I have reregistered with StarAlignment the original cc.c.xisf files (now on a different drive) to the new reference and successfully processed through Integration.  It is only this last step of DrizzleIntegration that I haven't overcome.
CS/Jeff
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline jpaana

  • Newcomer
  • Posts: 13
Re: Star Alignment Bug?
« Reply #27 on: 2018 March 28 03:24:32 »
Did you also regenerate the .xdrz files with StarAlignment and ImageIntegration as they contain the references to those original files?

Offline jeffweiss9

  • PixInsight Old Hand
  • ****
  • Posts: 339
Re: Star Alignment Bug?
« Reply #28 on: 2018 March 28 07:17:44 »
Yes, I regenerated the .xdrz files but they are in a different location from the original c_cc.xisf files.
APM LZOS 130/780 f/6 LW CNC II APO, Riccardi 1.0 FF or 0.75 FF/FR, Tak EM-200 Temma2, FLI Microline ML-16200, Astrodon E Gen 2 filters and 5nm Ha, Orion 50mm Guider & Starlight Xpress Lodestar X2.

Offline dld

  • PixInsight Addict
  • ***
  • Posts: 132
Re: Star Alignment Bug?
« Reply #29 on: 2018 March 28 08:43:06 »
jpaana-
Thanks.  That makes sense. But then my actual problem then is that PI 1.8.05 is asking for the cc.c.xisf files on the wrong disk drive because they are no longer on the drive where they were created - since it crashed.  PI doesn't seem to offer the user to browse to find those original c.cc.xisf files.    This is all part of this problem of reregistering old files from one camera to another reference from a new camera.  I think PI should offer a browse option if it doesn't find the files it is looking for where they were when the files were generated in 2015.  With the help of folks above, I have reregistered with StarAlignment the original cc.c.xisf files (now on a different drive) to the new reference and successfully processed through Integration.  It is only this last step of DrizzleIntegration that I haven't overcome.
CS/Jeff

Maybe if you look at:

DrizzleIntegration > Format Hints > Input directory,

and provide the directory where the input images ( cc.c.xisf) are located?

I'm very sorry if I am saying something already mentioned.
Hope this helps!