Author Topic: Trouble with ManualImageSolver  (Read 2981 times)

Offline astrorunner

  • Newcomer
  • Posts: 11
Trouble with ManualImageSolver
« on: 2017 September 12 16:13:06 »
I'm wanting to run the AperturePhotometry script for a project I'm doing looking at a star that is suspected to be slowly varying in intensity. I'm not a professional, just an amateur with a DSLR camera. I'd greatly appreciate some help with this.

My understanding is that for this script to work I need to provide PI with coordinates for the image, and the way to do this is to run ImageSolver. However ImageSolver is failing to come up with solutions to many of my images, even raw files that have been calibrated and stacked, despite running through all the star catalogs and all the parameter combinations (and spending many hours doing so). Therefore I've been trying to use ManualImageSolver.

I'm following the directions specified in the help pages in PI. I run DynamicAlignment using a reference image from the CatalogStarGenerator as suggested. The image from the CatalogStarGenerator is quite a bit larger than my image, as suggested, and I have been able to match up about 30 stars in DynamicAlignment. I then click the green checkmark and run the DynamicAlignment. I create a process icon onto the desktop and then run ManualImageSolver. For the "Control Points Icon" I select the saved process icon from DA. For the "Reference Image" I've been choosing the image from the CatalogStarGenerator (which incidentally has been annotated, if that makes a difference). I selected all four of the boxes for  residual maps and distortion and I run the MIS.

The output is two windows, one for "errors" and one for "distortions". I'm not sure how to interpret the distortions image. The errors shows my original image with green crosses superimposed on the stars and red dots at the centers of the green crosses. My understanding is that this is good and shows that there was good alignment between the reference image from the CatalogStarGenerator and my image. However, after this step I'm confused and not able to properly annotate the image as I'd hoped and I'm not sure what is wrong.

I run AnnotateImage on my original image (which apparently now has coordinates assigned to it). Labels appear on the image but they are very far off target. The appropriate labels are not even in the image at all. Nothing is aligned with the stars.

Thanks in advance for any help on this.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Trouble with ManualImageSolver
« Reply #1 on: 2017 September 12 19:39:26 »
can you post one of your calibrated images, the pixel size of the camera and the focal length of your telescope?

rob

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Trouble with ManualImageSolver
« Reply #2 on: 2017 September 13 01:10:43 »
[...] I then click the green checkmark and run the DynamicAlignment. [...]
Hi.
You don't have to run DynamicAlignment. You only have to save the icon of DA with the control points. Then run ManualImageSolver on your original image using the saved icon and the reference image.

DynamicAligment is only used as a way for selecting the control points. Implementing this inside the script would have been very difficult, so I decided to use this trick  8)

Andrés.

Offline astrorunner

  • Newcomer
  • Posts: 11
Re: Trouble with ManualImageSolver
« Reply #3 on: 2017 September 14 06:36:42 »
[...] I then click the green checkmark and run the DynamicAlignment. [...]
Hi.
You don't have to run DynamicAlignment. You only have to save the icon of DA with the control points. Then run ManualImageSolver on your original image using the saved icon and the reference image.

DynamicAligment is only used as a way for selecting the control points. Implementing this inside the script would have been very difficult, so I decided to use this trick  8)

Andrés.

Thank you Andrés! It's very nice to speak with the people writing the software. I will try this approach and let you know.

Offline astrorunner

  • Newcomer
  • Posts: 11
Re: Trouble with ManualImageSolver
« Reply #4 on: 2017 September 14 11:38:29 »
I tried to upload pictures directly to the forum but for some reason it timed out and nothing showed up. So here's a link to the files on Google drive: https://drive.google.com/drive/folders/0B2wyjA4jhK9VQkZ6aDhxbVRwVHM?usp=sharing

As for my setup: I'm using a Celestron 9.25" with a focal length of 2350 mm and pixel scale about 0.38 arcseconds/pixel, using the Canon T3I at prime focus (no other barlows or eyepieces, filters, etc in the light path). My mount is an Orion Atlas Pro, unguided (so I'm limited to short exposures).

Here is the info on the four files:

Screen shot.jpg: This shows my PixInsight project workspace with the reference image from the star catalog on the left and my image on the right, with DynamicAlignment invoked. I had 27 star alignments. DA was able to automatically match stars between the two images after about 2 stars were done totally manually. My confidence was high that the mapping was working well.

IMG_0005.xisf: This is the original image file. Unfortunately this particular snapshot is not calibrated. I couldn't figure out why that was either but BatchPreprocessing couldn't perform registration and then stacking. The calibrated files came out totally black and no data. Maybe the snapshot was too dim? I shot 20 seconds at ISO 400 using a Canon T3I.

IMG_0005_Errors.jpg: This file shows the errors following ManualImageSolver. It looks (to me) like a perfect solution, as the green crosses are all aligned on the stars and the red portion are dots and not lines.

IMG_0005_Annotated.jpg: This is the original file with annotations applied following running ManualImageSolver. As you can see the labels are all skewed and not aligned to stars.

I just don't know what I did wrong but I suspect there's a box or setting somewhere that's off. I just can't find it! Any help is again much appreciated. Thanks for your time.

-- Bert

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Trouble with ManualImageSolver
« Reply #5 on: 2017 September 14 15:26:41 »
ok, so.

i don't know if you were trying to run on undebayered images or not, but if so that's probably the first problem.

here is what i had to do

1) load xisf into PI
2) cosmetic correction on CFA file to get rid of hot pixels
3) debayer - i used superpixel because i can see that the stars are pretty soft and not round, so a non-interpolated file is probably better.
4) used astrometry.net's command line program to find the center coordinates of the image (Field center: (RA H:M:S, Dec D:M:S) = (05:23:31.600, -01:04:05.970), at 0.802app)
5) tried to run ImageSolver with those coordinates, but it just can't find enough stars, so
6) extracted L from the superpixel debayered RGB file, stretched it
7) ran ImageSolver with the star detection threshold set to -3 against the stretched L, ImageSolver succeeded
8 ) opened the FITS header of the stretched L file and applied it to the superpixel debayered RGB file, saved debayered RGB file
9) tried to run AperturePhotometry but found that it was designed for mono files
10) extracted R channel from superpixel debayered file, saved to disk, ran aperturephotometry OK (but i don't know anything about this so i don't know if the analysis makes sense.

here is the debayered RGB file with WCS coordinates embedded:

https://drive.google.com/open?id=0B6cW4ae2KyMJandfYWpZbjNQUkk

rob

Offline astrorunner

  • Newcomer
  • Posts: 11
Re: Trouble with ManualImageSolver
« Reply #6 on: 2017 September 15 08:07:21 »
Thanks Rob! That was quite a bit of work. I myself have been struggling rather hard for awhile with this and didn't know what way to go.

So, it sounds like, if I'm interpreting your results correctly, the stars in the image were too dim for ImageSolver? It sounds like success came after you were able to stretch it a bit (with extracted L).

I've been having this sort of issue with many of my images. With a few of them, ImageSolver does work, but maybe less than half. I also run Astrometry on all my photos, just to see what it comes up with for a center and pixel scale (and to see if it chokes or not). So far, Astrometry.net has never failed to plate solve any of my images. But I prefer PI by far because of greater feature selections in labeling the image with stars and grids, etc.

Again, this has been a big help. I'll see if I can replicate what you did. Thanks also for the output file.

-- Bert

Offline astrorunner

  • Newcomer
  • Posts: 11
Re: Trouble with ManualImageSolver
« Reply #7 on: 2017 September 15 08:09:21 »
I guess the only issue remaining is why ManualImageSolver didn't work. Again, to me it was strange that it seemed as though there was a solid mapping established between the reference and target image, and the error image looked great. It's just the final image annotation that failed.  Probably if I can just get ImageSolver working I won't ever need the manual methods though.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Trouble with ManualImageSolver
« Reply #8 on: 2017 September 15 09:35:17 »
Thanks Rob! That was quite a bit of work. I myself have been struggling rather hard for awhile with this and didn't know what way to go.

So, it sounds like, if I'm interpreting your results correctly, the stars in the image were too dim for ImageSolver? It sounds like success came after you were able to stretch it a bit (with extracted L).

I've been having this sort of issue with many of my images. With a few of them, ImageSolver does work, but maybe less than half. I also run Astrometry on all my photos, just to see what it comes up with for a center and pixel scale (and to see if it chokes or not). So far, Astrometry.net has never failed to plate solve any of my images. But I prefer PI by far because of greater feature selections in labeling the image with stars and grids, etc.

Again, this has been a big help. I'll see if I can replicate what you did. Thanks also for the output file.

-- Bert

no problem,

i think probably the stars were not focused well enough and also a little oval. StarAlignment itself has a lot of controls to try to mitigate this but ImageSolver does not expose them. i guessed if i stretched the image it would help find a few more stars, and it did.

it's interesting that the online astrometry.net does not fail - i had to tweak the command line arguments a bit in order to get a successful solve. maybe i was overthinking it.

rob



Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Trouble with ManualImageSolver
« Reply #9 on: 2017 September 15 10:05:21 »
Hi Astrorunner.

I have just tested your image with ManualImageSolver and I have not found any problems. The image gets solved well and the annotation is spot on.

I don't know why it doesn't work for you. I can only suggest a few things:
  • Debayer the image before running ImageSolver or ManualImageSolver. If you don't do this the star detection algorithms are less precise and could fail.
  • When working with DynamicAligment remember that the first image MUST be the reference image, and the second must be yours.
  • Try to select at least 10 control points well distributed on the image. If possible, there should be one as near as possible to each corner.
  • Before saving the icon in DynamicAligment check that all the control points are valid: Select each control point in the window of DynamicAligment. There should be a zoomed view of the star in each image. If there is a message "No convergence" the control point is not ok and you should fix it.
  • Do not activate the distortion correction. Your image doesn't need it.
  • Read again the documentation clicking the icon at the bottom left of the window of ManualImageSolver. The version of the documentation in pixinsight.com is outdated. I will remind Juan to update it.

Andrés.

Offline astrorunner

  • Newcomer
  • Posts: 11
Re: Trouble with ManualImageSolver
« Reply #10 on: 2017 September 15 12:59:52 »
Thanks again Rob and Andrés. This is a really great forum! I'd be lost and would have given up without the boost from you two.

I will re-run my images keeping in mind all the suggestions and will post again if I have problems. I'm hoping I will be on a better track now and avoid the issues.

Best,

Bert.