I need help utilizing platesolving to help with registration

I’ve read the documentation, but it still couldn’t quite figure out how to update my stacking script, which uses two pass registration, to take advantage of the new platesolving feature for distortion correction.

My existing script segment looks like this:

Pre-process Light Frames

calibrate light -bias=bias_stacked -flat=pp_flat_stacked -cfa -equalize_cfa -debayer

Align lights

First doing: register pp_light -2pass -nostarlist

register pp_light -2pass -nostarlist

Now doing: seqapplyreg pp_light -framing=max

seqapplyreg pp_light -framing=max

And I know the platesolve would be this, that I do before registration:

seqplatesolve pp_light

Do I have to then save a distortion file with -disto= then like this?

Hi Naz,

I can’t find any information on the SIRIL website that gives basic examples of how to utilize the new distortion correction provided by platesolving during registraton. FOr instance, if I have this basic two pass registration:

Pre-process Light Frames

calibrate light -bias=bias_stacked -flat=pp_flat_stacked -cfa -equalize_cfa -debayer

Align lights

First doing: register pp_light -2pass -nostarlist

register pp_light -2pass -nostarlist

Now doing: seqapplyreg pp_light -framing=max

seqapplyreg pp_light -framing=max

How would I modify this to add astrometray. Clearly I would need to add:

seqplatesolve pp_light

Do I need to write the distoraqtion file out with the -disto= command like this:

seqplatesolve pp_light -disto=distortionFile

and then utilize that during the registration? like this:

register pp_light -2pass -nostarlist -disto=distortionFile

Hint hint, I tried this but it doesn’t work, it returns this error:

16:24:07: Running command: register
16:24:07: Unknown distortion type distortionParameters, aborting.
16:24:07: Error in line 86 (‘register’): invalid arguments.
16:24:07: Exiting batch processing

So I’m unable to figure it out. Some help on exactly how I should change my original script would be appreciated, or a pointed to a working script.

Thanks!

Hi, I think you’ve seen Commands — Siril 1.4.2 documentation already:

-disto= uses distortion terms from a previous platesolve solution (with a SIP order > 1). It takes as parameter either image to use the solution contained in the currently loaded image, file followed by the path to the image containing the solution or master to load automatically the matching distortion master corresponding to each image

but it’s not that simple to understand indeed: distortionFile is not a correct argument, if it’s the name of your file then it should be -disto=file distortionFile instead

1 Like

Sorry, I’ve been away. I’ll give that a try. Thanks!

Well, it didn’t work but it got closer. I tried this:

#platesolve the lights
seqplatesolve pp_light -disto=“distortionFile.dsf”

Align lights

register pp_light -2pass -nostarlist -disto=file “distortionFile.dsf”

Now apply the registration

seqapplyreg pp_light -framing=max

The issue is I got this:

16:32:28: Running command: register
16:32:28: FITS error: failed to find or open the following file: (ffopen)
16:32:28: FITS error: distortionFile.dsf
16:32:28: Could not load FITS image for distortion
16:32:28: Error in line 28 (‘register’): invalid arguments.
16:32:28: Exiting batch processing.
16:32:28: Setting CWD (Current Working Directory) to ‘D:\Astrocapture\Deepsky\All SH2-313’
16:32:28: Script execution failed.

And I could not find any distortionFile.dsf on the disk. The Seqplatesolve with the distortion file output worked but no file appeared to be created. Do I need to have an explicit path, I assume it would place it in the current working directory.

BTW, the syntax appears correct as with seqplatesolve you just say “-disto=” but with register you need “-disto=file ”

what file type is that .dsf?
all is done relative to the CWD, so make sure you have your file in there or with a relative path from it

I was trying to get AI help and it used the “.dsf” probably a hallucination. I took off the .DSF and got the same error but found this error earlier:

17:16:03: FITS error: failed to create new file (already exists?):
17:16:03: FITS error: “distortionFile”
17:16:03: Could not save distortion master file, skipping

But no file exists.

I’ve written many scripts but man, I’m struggling here. Can someone out there write a basic OSC stacking script, even a simple one with only lights, that does platesolving on the lights and usese the distortion information during two pass registration?

We’re only talking about a 5 line script… I can’t do it.

I’ve failed.

The distortion file is the one created by the astrometry process and the extension is wcs.

Writing this, works for me: seqplatesolve test -disto=distortionFile.wcs