Author Topic: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"  (Read 5508 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Console output:

Code: [Select]
run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/AdP/ImageSolver.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/AdP/ImageSolver.js

Searching in Sesame:
http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame/-oI/A?orion
820 bytes transferred in 0.78 s @ 1.03 KB/s
Seed parameters for the plate solving:
   Image coordinates: RA=05 35 17.300, Dec=-05 23 28.00
   Resolution: 96.25690794273292
Starting StarAlignment iteration

Downloading Vizier data:
http://vizier.u-strasbg.fr/viz-bin/asu-tsv?-source=V/50/catalog&-c=83.822083 -5.391111&-c.r=104.492221&-c.u=deg&-out.form=|&-out.add=_RAJ,_DEJ&-out=pmRA&-out=pmDE&-out=Name&-out=HR&-out=HD&-out=DM&-out=SAO&-out=Vmag&-out=B-V&-out=U-B&-out=R-I&-out=SpType&Vmag=<11
602836 bytes transferred in 1.04 s @ 563.36 KB/s
Using epoch: 2013.1690622861054
Catalog Bright Stars  size: 5674 objects
*** Error [222]: C:/Program Files/PixInsight/src/scripts/AdP/WCSmetadata.jsh, line 899: TypeError: p is null
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #1 on: 2013 November 22 01:19:27 »
Hi Georg,

could you upload anywhere the image that fails?

Andrés.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #2 on: 2013 November 22 09:41:20 »
Hi Andres,
Settings as shown in attached screenshot (Center M42, focal length 12 mm, pixel size 5.6 um). The Image is available on https://skydrive.live.com/?cid=c56e60845cfa6790&id=C56E60845CFA6790%21247&sff=1#cid=C56E60845CFA6790&id=C56E60845CFA6790%21247&v=3.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #3 on: 2013 November 22 15:30:28 »
Hi Georg,

there is a bug in the script for images of very short focal length. I have fixed it and I have sent it to Juan. The new version have also a few additional improvements. However, I don't think you are going to be able to solve that image without a very good distortion model.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #4 on: 2013 November 23 03:36:10 »
Thanks for looking into it. I will give it another try (with distortion model) when the new version is released.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #5 on: 2013 November 23 03:43:39 »
Thanks for looking into it. I will give it another try (with distortion model) when the new version is released.
Georg

You can use ManualImageSolver for generating the distortion model:
http://pixinsight.com/forum/index.php?topic=5817.0
http://pixinsight.com/forum/index.php?topic=5657.0

The funny thing is that if you solve the image with ManualImageSolver, then you don't need the model for ImageSolver  ;) ;)
In any case, you can keep the model for solving other images taken with the same optical configuration.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #6 on: 2013 December 30 11:15:41 »
Hi Andres,
I tried the version of the script that you published in http://pixinsight.com/forum/index.php?topic=6535.0 . It solves with a residual of ~3 pixels, but when I use it to annotate, I get the result shown in the attachment: Orion clearly has an offset of more than 3 pixels....
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #7 on: 2013 December 30 11:38:34 »
Hi Andres,
I tried the version of the script that you published in http://pixinsight.com/forum/index.php?topic=6535.0 . It solves with a residual of ~3 pixels, but when I use it to annotate, I get the result shown in the attachment: Orion clearly has an offset of more than 3 pixels....
Georg
Before using a solution you have to check if it is valid.  In this case your image is clearly not well solved. You should try to set a better starting point, find a good value for the sensitivity and select the catalog Bright Stars.

However, I don't know if you are going to be able to get a good solution for that image. It seems to be taken with a quite short focal length and it probably requires a distortion model. It also has very few stars, so it has very few information to work with. Perhaps ManualImageSolver could find a workable solution.

ImageSolver currently does not validate the solution. I am thinking in implementing an automatic validation that warned if the solution was suspicious, but it is not easy.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #8 on: 2013 December 30 13:37:00 »
Hi Andres,

I did use the bright star catalog.  The output saod that it solved with 3 pixels error for 340 stars, see below. The distortion map looked reasonable (see screenshot), so I felt that teh result was reasonable. However, looking at the star map (screenshot right) suggests that the matching happened to noise artifacts  :-[ .

Hmm.
Georg

Code: [Select]
DynamicPSF: Global context
1 view(s)
1308 star(s)
796 PSF fittings
5.205 s
Error StdDev=9.74 pixels
Tolerance for rejecting stars: 5.00 pixels
Valid stars: 347
Rejected stars: 449

*****
Iteration 9, delta = 3.735 arcsec (0.04 pixels)
Image center ...... RA: 04 58 36.163  Dec: +09 02 04.88
Resolution ........ 99.02 arcsec/pix
RMS ............... 2.9334 pix (347 stars)
*****
Calculating final referentiation matrix
Creating distortion map
Creating error map

Image Plate Solver script version 3.4
===============================================================================
Referentiation Matrix (Gnomonic projection = Matrix * Coords[x,y]):
             -0.0245597          -0.0135946            +65.7007
             +0.0127134          -0.0237502            +6.00265
                     +0                  +0                  +1
Projection origin.. [1954.438883 1299.232663]pix -> [RA:+04 58 36.16 Dec:+09 02 04.88]
Polynomial degree.. 3
Resolution ........ 99.020 arcsec/pix
Rotation .......... 28.867 deg
Focal ............. 11.67 mm
Pixel size ........ 5.60 um
Field of view ..... 107d 29' 30.4" x 71d 34' 10.2"
Image center ...... RA: 04 58 32.972  Dec: +08 59 13.27
Image bounds:
   top-left ....... RA: 08 17 57.292  Dec: +09 44 10.82
   top-right ...... RA: 02 49 56.149  Dec: +48 28 36.93
   bottom-left .... RA: 06 38 08.401  Dec: -32 33 12.92
   bottom-right ... RA: 01 43 41.199  Dec: +01 59 08.61
===============================================================================
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: PI1.8-1054: ImageSolver script fails with "TypeError: p is null"
« Reply #9 on: 2013 December 30 14:02:26 »
A question: Is the Errors-Plot for stars that were actually matched, or is it for all detected stars based on the destortion model found? When I compare the found stars (ticked at sensitivity slider) to those on the error plot, I just cannot match them properly.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)