Author Topic: ImageSolver using list of files not solving  (Read 3538 times)

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
ImageSolver using list of files not solving
« on: 2016 September 28 07:40:53 »
I'm working on a large (20 panel) mosaic and intend to use MosaicByCoordinates.  MBC doesn't seem to work unless the panels have the appropriate WCS headers, so first it seems we need to solve with ImageSolver.

ImageSolver works fine if I apply it to each of the panels using the "active window" method, but since there are 20 panels, I thought I'd try the "list of files" method instead.  However, using this method I'm getting lots of errors.  Not sure if it's user error (probably is), or a bug, or something else.

The "target image" panel of the script window appears pretty straightforward, however perhaps the issue is in the "image parameters" panel?  I have "only apply optimization" unchecked; the RA and Dec I have set to the middle of the mosaic; focal distance I've put in the focal length of my scope (506mm); and pixel size of 2x sensor pixel size because I'm doing 2x2 binning.

"Model parameters" I don't really touch from when I do individual solves - it's a local PPMX.bin file.

Any ideas?

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: ImageSolver using list of files not solving
« Reply #1 on: 2016 September 28 08:17:31 »
When solving a list of files the solver tries first to read the keywords OBJCTRA, OBJCTDEC, FOCALLEN and XPIXSZ from each image. If any image doesn't have some of these parameters then  the script uses the values in the section "Image parameters".

I think your images don't have the keywords OBJCTRA and OBJCTDEC and the value that you have set in "Image parameter" is too far from the center of some of the tiles.

You can try to set the keywords OBJCTRA and OBJCTDEC for each tile. Many capture programs set these keywords to the coordinates of the telescope. These values are usually good enough as the starting point of ImageSolver. For each tile, find one of the original subframes and copy the contents of the OBJCTRA and OBJCTDEC keywords to the final integrated image.

Andrés

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: ImageSolver using list of files not solving
« Reply #2 on: 2016 September 28 20:08:53 »
G'day Andres.  I checked the frames, and they do all have those keywords.  This was just a test run with single subs, and the images were captured in Sequence Generator Pro, which does seem to add those keywords to the FITS headers.  I'm using ImageSolver on the calibrated and cosmetisized subs saved as XISF files, but the headers are still there.

Any other ideas?

I imagine when doing the final image with integrated frames, the headers will disappear and I'll have to do each frame manually with ImageSolver, or as you suggest, manually add the headers.  Probably still quicker to manually use the script.

I've attached some screenshots to assist.  Just noticed that it did actually solve 3 of the frames, but not all.  All captured and calibrated exactly the same way, same headers etc.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: ImageSolver using list of files not solving
« Reply #3 on: 2016 September 29 01:49:24 »
Hi,

Have you tried to solve the images individually? You should try to solve one of them in order to find which parameters work best.

In your screen capture I see a few things that you could change:
  • I have never needed to use a value less than -1 for the "Star sensitivity". You can activate the "Show stars" option. This generates an image where the detected stars are marked. You should adjust the sensitivity so there are not any false positives and to get at least a few hundred of "true" detected stars.
  • Try to activate the noise reduction. A value of one or two can help.
  • Try to change the magnitude of the catalog filter. You are limiting the catalog to 12mag stars. Are you sure that there are not dimmer stars in your image? This value should be matched with the image.

MosaicByCoordinates sets the astrometric metadata in the result. I don't know if GradientMergeMosaic keeps it. If it doesn't do it you can copy the coordinates following the instructions in the documentation of ImageSolver.

The documentation of ImageSolver and MosaicByCoordinates has several tips about how to best use them. I would recommend to read it. You can do it from inside PixInsight clicking the documentation button of the scripts or you can go to http://pixinsight.com/doc/index.html

Andrés.

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: ImageSolver using list of files not solving
« Reply #4 on: 2016 September 29 04:38:08 »
I have been successfully solving them individually using the "active window".

I also just tried solving a single image (#1 top right of mosaic) using the "list of files" method and the same settings, and it solved fine.  I started adding files - 2 worked fine, 3 worked fine.  Note that they were all adjacent panels, and the I think that because I first did one by itself, the "image parameters" were remembering the first panel's RA/Dec.

I then tried all 20 panels, and only the first 5 (the first column of the 4x5 mosaic) solved, all others failed.

It appears that when using "list of files" it's not picking up on the individual panels' RA/Dec from its headers, but rather it seems to be using the RA/Dec from the "image parameters" fields.

Tested this theory by solving individual frame #20 at the bottom left of mosaic.  Solved fine.  Then tried solving all 20.  The "image parameters" were still there from the individual frame.  It solved 3 of the 20 frames - frame #20 and frames #19 and #15, both adjacent to #20.

Not sure how the code is written, but if using a list of files, despite what it says in the "image parameters" fields, shouldn't the script be picking up on each file's RA/Dec headers?  It doesn't seem to be doing that.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: ImageSolver using list of files not solving
« Reply #5 on: 2016 September 29 04:42:02 »
Not sure how the code is written, but if using a list of files, despite what it says in the "image parameters" fields, shouldn't the script be picking up on each file's RA/Dec headers?  It doesn't seem to be doing that.
It should behave as you say. I'll check if there is any error.

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: ImageSolver using list of files not solving
« Reply #6 on: 2016 October 02 04:28:09 »
I have just uploaded to GitHub a fix to this problem.
https://github.com/PixInsight/PJSR/pull/33

Offline troypiggo

  • PixInsight Addict
  • ***
  • Posts: 258
Re: ImageSolver using list of files not solving
« Reply #7 on: 2016 October 03 17:22:43 »
That's excellent.  Thanks mate.  Made the changes to the script files, and worked perfectly.