esa / tetra3

A fast lost-in-space plate solver for star trackers.
https://tetra3.readthedocs.io/en/latest/
Apache License 2.0
102 stars 24 forks source link

Catalog Gen Questions & Solve Problems #8

Closed Darby-Dermanoski closed 1 year ago

Darby-Dermanoski commented 1 year ago

Dear Gustav,

I am having some problems solving my images, and I believe that the issue may be in my database generation. Here are the parameters that I input into the database generation call: max_fov = 35 (the calculated horizontal fov of my images is 35.57 degrees), star_max_magnitude = 6.5, and of course a save name. I have been using hip_main.dat (that I downloaded from https://cdsarc.u-strasbg.fr/ftp/cats/I/239/ initially as a .txt and then converted to just .dat).

Running this outputs: 2023-07-24 10:46:37,506:tetra3.Tetra3-INFO: Loading catalogue hip_main with 118218 star entries. 2023-07-24 10:46:38,646:tetra3.Tetra3-INFO: Skipped 263 incomplete entries. 2023-07-24 10:46:38,651:tetra3.Tetra3-INFO: Loaded 8870 stars with magnitude below 6.5. 2023-07-24 10:46:38,686:tetra3.Tetra3-INFO: Trimming database to requested star density. 2023-07-24 10:46:38,699:tetra3.Tetra3-INFO: Generating patterns at FOV scales: [35.575945] 2023-07-24 10:46:38,700:tetra3.Tetra3-INFO: At FOV 35.57594 separate stars by 6.750060966772736deg. 2023-07-24 10:46:38,874:tetra3.Tetra3-INFO: Stars for patterns at this FOV: 519. 2023-07-24 10:46:38,874:tetra3.Tetra3-INFO: Stars for patterns total: 519. 2023-07-24 10:46:55,858:tetra3.Tetra3-INFO: Found 553877 patterns in total. 2023-07-24 10:46:56,013:tetra3.Tetra3-INFO: Total stars for verification: 1359. 2023-07-24 10:46:56,802:tetra3.Tetra3-INFO: Start building catalogue. 2023-07-24 10:46:56,940:tetra3.Tetra3-INFO: Catalog size (1107754, 4) and type uint16. 2023-07-24 10:47:29,669:tetra3.Tetra3-INFO: Finished generating database. 2023-07-24 10:47:29,670:tetra3.Tetra3-INFO: Size of uncompressed star table: 32616 Bytes. 2023-07-24 10:47:29,670:tetra3.Tetra3-INFO: Size of uncompressed pattern catalog: 8862032 Bytes. 2023-07-24 10:47:29,673:tetra3.Tetra3-INFO: Saving database to: /mnt/c/Users/USER/Desktop/Tetra3/tetra3/Test2_Database_FOV35.npz

The resulting database is an NPZ with a size of 3579 KB. Attempting the solver using this database fails -> 'RA': None, 'Dec': None, etc.

These database generation times really stood out to me, as when using tetra about a month or so ago, similar catalogs took around 20+ minutes. What could I be doing wrong in my setup to prompt this failure?

Thanks! Darby

gustavmpettersson commented 1 year ago

Hi Darby,

It looks like the generation is working, with keeping so few stars you will have a small database that builds quickly.

Did you solve images from this same camera system successfully in the past? If you are able to share an image with me I can help more easily.

Darby-Dermanoski commented 1 year ago

Sort of. In the past (mid June, when the default database was ~10 degrees), I would individually crop images down such that they worked with the default database. Other than that, I have not been able to get a good solve (it may well be my images). Here is the image I have been testing with (image properties should be identical to the original): DSC_0081

gustavmpettersson commented 1 year ago

Thanks,

In this particular image the stars are very blurry, so the centroiding algorithm by default can't pick them out. Increasing max_area from the default of 100 (or setting None) works. An alternative is to downsample=4 (bins 4x4 pixels), since your image has very high resolution.

In general, it's very important to get the centroiding tuned, you can use the get_centroids_from_image directly to tune the settings and see the intermediate steps.

Let me know if you have further questions!

Darby-Dermanoski commented 1 year ago

Thank you, Gustav these methods have been very helpful!