Author Topic: Image that won't Solve  (Read 800 times)

Offline JST200

  • Newcomer
  • Posts: 29
Image that won't Solve
« on: 2019 September 03 12:36:21 »
Hi,

I have an image that curiously won't solve, either in Photometric Colour Calibration or Image Solver. However, it solves using PlateSolve2 (PS2) and All Sky Plate Solver (ASPS).

It's one of a set of 6 images in a mosaic and the others solve fine.

If anyone can help with any pointers, I would be grateful!

There is a copy of the integration.xisf here: https://1drv.ms/u/s!AgjJ1doGv5CshMAuMrLiyZO_sUY1kA?e=5hlz6h
Please note the file is 227MB.

Thanks, Jim

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Image that won't Solve
« Reply #1 on: 2019 September 03 12:46:39 »
hmm, it solved for me first try:

Image Plate Solver script version 5.1.1
===============================================================================
Referentiation Matrix (Gnomonic projection = Matrix * Coords[x,y]):
           +1.91642e-05        -0.000319622           +0.530867
           +0.000319618        +1.91541e-05           -0.904272
                     +0                  +0                  +1
Projection origin.. [2720.010203 1824.003853]px -> [RA:20 47 26.597 Dec:+30 47 50.42]
Spline order ...... 2
Num. ControlPoints. 88
Resolution ........ 1.153 arcsec/px
Rotation .......... 93.430 deg
Focal ............. 431.25 mm
Pixel size ........ 2.41 um
Field of view ..... 1d 44' 30.7" x 1d 10' 5.0"
Image center ...... RA: 20 47 26.598  Dec: +30 47 50.41
Image bounds:
   top-left ....... RA: 20 49 53.498  Dec: +29 53 31.29
   top-right ...... RA: 20 50 25.531  Dec: +31 37 45.67
   bottom-left .... RA: 20 44 30.718  Dec: +29 57 40.73
   bottom-right ... RA: 20 44 56.896  Dec: +31 41 59.64
===============================================================================


i didn't change anything in my settings, nor did i search for a starting coordinate... it seems to have been loaded from the image itself. are you sure this one didn't solve before and you uploaded the wrong one? my settings attached - i have a local copy of the star catalog but i also ran it again with "automatic catalog" which downloads from the web and it was able to solve that time as well.

rob

Offline JST200

  • Newcomer
  • Posts: 29
Re: Image that won't Solve
« Reply #2 on: 2019 September 03 13:08:50 »
Thanks Rob,

I've just checked it is the correct file by using the one I i uploaded. But it was worth the check. :)

There seem to be some differences between your solver and mine. Your's is V5.1.1, mine is V5.3.2. I don't know if that makes a difference.

However, I think, for some reason, it's not seeing any stars:
    Scanning star data: done
    0 stars.".
Though I can't see why:

If I run the image through SubframeSelector it sees 4338 stars!

The full process log is:

Quote
Processing script file: C:/Program Files/PixInsight/src/scripts/AdP/ImageSolver.js
* Using an automatically calculated limit magnitude of 13.12.
* Using the automatically selected GaiaDR2 catalog.
Seed parameters for plate solving:
   Image coordinates: RA = 20 48 31.300, Dec = +30 52 30.20
   Resolution: 1.159 as/px
Starting StarAlignment iteration

Downloading Vizier data:
http://vizier.u-strasbg.fr/viz-bin/asu-tsv?-source=I/345/gaia2&-c=312.130417 30.875056&-c.r=2.101176&-c.u=deg&-out.form=|&-out.add=_RAJ,_DEJ&-out=pmRA&-out=pmDE&-out=Source&-out=Gmag&-out=RPmag&-out=BPmag&-out=Plx&-out=RV&-out=Rad&-out=Lum&Gmag=<13.12
2136 bytes transferred in 0.41 s @ 5.14 KiB/s
FOV:2.101 actual:0.000
Catalog Gaia DR2 size: 0 objects

Using the triangle similarity star matching algorithm.

StarAlignment: Processing view: integration
C:/Users/jim/AppData/Local/Temp/stars.csv:
Scanning star data: done
0 stars.
*** Error: C:/Users/jim/AppData/Local/Temp/stars.csv: 0 star(s) found - need at least six stars.
<* failed *>
*** Error: The image could not be aligned with the reference star field
Please check the following items:
The initial coordinates should be inside the image.
The initial resolution should be within a factor of 2 from the correct value.
Adjust the star detection sensitivity parameter, so that the script can detect most of the stars in the image without mistaking noise for stars.
The catalog should be matched to the image. Choose the appropriate catalog and magnitude filter, so that the number of stars extracted from the catalog can be similar to the number of stars detected in the image.
*** Failure to plate solve the image.
This is usually because the initial parameters are too far from the real metadata of the image.
« Last Edit: 2019 September 03 14:04:00 by JST200 »

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Image that won't Solve
« Reply #3 on: 2019 September 03 14:21:22 »
looks like i have stayed back one version on PI. can't remember now if i had a good reason for this.

it's not the image that it can't find any stars in - instead it would seem that the stars.csv that's been downloaded from vizier is essentially empty. the script is asking for stars with a magnitude of less than 13.12; what happens if you uncheck "automatic magnitude" and take the default of 19?

rob

Offline leemr

  • Newcomer
  • Posts: 4
Re: Image that won't Solve
« Reply #4 on: 2019 September 03 15:16:46 »
I have the same issue. Was working fine yesterday, now not. I haven't tried Rob's suggestion yet though.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Image that won't Solve
« Reply #5 on: 2019 September 03 16:15:11 »
oh also, if it turns out that VizieR is messed up somehow, you can also download the PPMX.bin file from here and then point ImageSolver at it:

https://pixinsight.com/download/

rob

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Image that won't Solve
« Reply #6 on: 2019 September 04 01:32:04 »
As I have explained in several previous messages, Vizier sometimes fails silently. It wrongly returns zero stars and the script can't know if this is because the query really has to return no stars or if there is any kind of problem at the server. If Vizier returned an error message I could modify the script so it would alert the user about the problems at the server, but in the current state I can not do anything.

The solution is to try another mirror or, as Rob says, download the PPMX.bin.

In any case we can not complain. The service at Vizier is usually excellent and free  ;)

Andrés

Offline JST200

  • Newcomer
  • Posts: 29
Re: Image that won't Solve
« Reply #7 on: 2019 September 04 01:42:29 »
Hi Rob,

Thanks a lot for your help. :)

Identifying that the "0 stars" was a VizieR download issue (so obvious once you pointed it out) was the key. I looked at "C:/Users/jim/AppData/Local/Temp/stars.csv" and as you suggested it only contained one line (5440, 5440). I deleted it and re-ran PCC. This caused a full VizieR download and PCC then worked.

It appears that if the (correct?) stars.csv file already exists it isn't re-downloaded?

I wonder if stars.csv was corrupt because at one point I requested PCC to abort, which didn't seem to be a very clean process. It seemed to eventually abort the current sub-process and start the next, which I had to abort too.

Thanks anyway. All good now.

Cheers, Jim

Offline JST200

  • Newcomer
  • Posts: 29
Re: Image that won't Solve
« Reply #8 on: 2019 September 04 01:55:09 »
Hi Andres,

Our posts crossed "in the post" :)

Understood. As you say, don't knock something that's free!  :D

Am I right that, if the (correct or any?) stars.csv file already exists, it isn't reloaded?

What I did notice was that the empty stars.csv file was only 1KB. The full starcs.csv is 114KB.

So just a thought...

Would it be possible for the script to check if stars.csv is empty? Perhaps either by looking at it's size or checking if it contains more than one line. If it is, then forcing a new download?

Or provide an option to force a download?

Or both (you can tell, I'm a belt and braces man  ;D )?

Personally I'd rather have a slow PCC process time, than one that fails and requires a bit of windows knowledge to fix.

Hope that helps?

Cheers, Jim

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Image that won't Solve
« Reply #9 on: 2019 September 04 02:20:52 »
Am I right that, if the (correct or any?) stars.csv file already exists, it isn't reloaded?
ImageSolver has a cache in memory. Before calling Vizier, the script checks if there is a previous query that is a superset of the new query. In this case, it reuses the result of the old query. This has nothing to do with "stars.csv".
If there is any kind of problem at Vizier or if there is a bug in my code (I think this section of the code is clean, but you can never be sure  ;) ), the cache can get corrupted. In this case, there are three options:
  • Reset the cache using the option inside the script (near the mirror server option).
  • Reset the Javascript engine (Script editor / Execute / Reset Javascript runtime)
  • Restart PixInsight.
What I did notice was that the empty stars.csv file was only 1KB. The full starcs.csv is 114KB.
The stars.csv file is generated each time the script is run. The only possible error would be if this file is locked, but this should not happen.

I can do some tests when I have some free time, but I think that stars.csv is a red herring. Most probably, the problem is that you have a bad query in the cache.

Andrés.

Offline JST200

  • Newcomer
  • Posts: 29
Re: Image that won't Solve
« Reply #10 on: 2019 September 04 03:01:42 »
Hi Andres,

So, as I understand it, restarting PixInsight should have worked? But I did, several times, which didn't fix the problem

The fix that worked was to delete stars.csv. Strange.

I didn't check that the timestamp on stars.csv changed on each PCC run. But, before I renamed it (rather than delete it), I ran PCC several times this morning, but it's timestamp is still from last night.

It was thinking that the file might have been locked somehow, perhaps as part of the abort, that led me to go looking for it.

Let me know if there are tests I can perform for you, that might help resolve this condition. I'm only too happy help anyway I can.

Cheers, Jim

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Image that won't Solve
« Reply #11 on: 2019 September 04 03:25:36 »
I didn't check that the timestamp on stars.csv changed on each PCC run. But, before I renamed it (rather than delete it), I ran PCC several times this morning, but it's timestamp is still from last night.
ImageSolver doesn't delete stars.csv, so the creation date of the file should not change in each run of the script. However, the modification date of the script should be that of the latest run.

It was thinking that the file might have been locked somehow, perhaps as part of the abort, that led me to go looking for it.
Stars.csv is created after the call to the catalog and before calling StarAligment. StarAligment is the only process that uses stars.csv so it is the only place where it could get locked. Perhaps StarAligment does not close stars.csv after an abort. I have to check this and warn Juan if this would be the case. However, closing PixInsight should unlock any files that could have been kept open.

Another possibility would be an antivirus or another similar tool that locks the file.



Offline JST200

  • Newcomer
  • Posts: 29
Re: Image that won't Solve
« Reply #12 on: 2019 September 04 03:31:56 »
Hi Andres,

I didn't think to check the modification date. I can do so later.

The only AV software I run is Microsoft Defender. So if it is AV related, it's a universal issue.

As I said, let me know if there's any info or test you want done.

Anyway, thanks for taking a look.

Cheers, Jim