Polar Alignment without Polaris (workflow)

Discussions on extending SharpCap using the built in Python scripting functionality
Jean-Francois
Posts: 82
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Polar Alignment without Polaris (workflow)

Post by Jean-Francois »

Hello Norman,

Concerning the Sky-Simulator software.
You can add some pointing error depending on the slew distance or the slew time.
It is nice for checking the plate solving software. The software can perform some small variation for testing PHD2. I have not tested it.

But, you can not simulate an error in the polar alignment.
The Sky-Simulator takes the (pointing) coordinate from the telescope driver (simulator or real telescope).

I think that some polar alignment error is possible to simulate at the start of the telescope.
In my case with EQ8 mount type, I can do a 2 stars alignment.
The first star without correction with the hand controller, but with the second star, it is possible to introduce some pointing error.
I need to think in "spherical geometry" to add a movement in RA+DEC so that the pole axis is moving in the wanted direction.
But with a condition that the angular distance between both stars have the same angle.

Concerning R and Stellarium ... not each potential user will take the effort for installing some new software for only this application.
Do you need really Stellarium ? or it is one of the potential software ... like CdC, Prism, and many other.
All the (planetarium) software can communicate with the telescope mount (the driver can have several client or it is possible to use a server or hub in between). In my case with my new mount, the SynScan software/driver is multi application ... mean I can command with SynScan (or with the hand controller if connected), then the telescope will move and the position in actualized in the planetarium software (for me CdC for test or Prism for imaging). The same if I move with the button from the planetarium software, the coordinate are actualized in the hand controlled or SynScan software.

Also for finding the first stars and slewing on it ... it is possible to use the hand controller itself or any planetarium software.

Regards,
Jean-Francois
fly_n
Posts: 26
Joined: Wed Oct 02, 2019 7:54 pm

Re: Polar Alignment without Polaris (workflow)

Post by fly_n »

Ok here we go.
There are two versions.
* One without test files which weighs in at just under 1MB
https://drive.google.com/file/d/1ZqJMom ... sp=sharing

* the second version with 4 different sets of pictures to try out at about 50MB.
https://drive.google.com/file/d/1UDQVit ... sp=sharing

Let me know of successes or failures, suggestions etc.
I hope you enjoy, Norman
fly_n
Posts: 26
Joined: Wed Oct 02, 2019 7:54 pm

Re: Polar Alignment without Polaris (workflow)

Post by fly_n »

Hello Jean-Francois,

yes I realize that the SkySimulator is not able to simulate an error in polar alignment.
However it is nice to see the alignment tool figure out that the error is close to zero - so it is helpful.

Yes I remember the EQ-Mount star alignment. Still drives shivers down my spine.
Once the polar alignment is complete, I'm a one-point alignment type of person.
I don't appreciate the mount trying to manipulate coordinates, it's another error source in my mind.

R is needed for the script to work for now. Maybe a conversion to Python is feasible in the future.
I'm counting on the alignment pain without Polaris in sight >> than the install of free software.
This is the whole reason driving me to this.

Concerning Stellarium maybe I wasn't clear. I want to reduce the amount of applications I have to switch back an forth during the alignment process. So the effort is directed at not having to use Stellarium initially.

Once everything is aligned, I'll typically use Stellarium to find the target and the hand controller to make some fine adjustments.
Then start capturing with SharpCap and make a cup of tea :-)

Of course one could also simply use the hand controller to line up a bright star.
The ulterior motive is to lay the ground work for a fully automatic alignment. The correction angles are known, if the mount had steppers for the ALT and AZ correction, one could drive them to the new position and have a correction that is better, than what is manually possible.

Kind regards,
Norman
fly_n
Posts: 26
Joined: Wed Oct 02, 2019 7:54 pm

Re: Polar Alignment without Polaris (workflow)

Post by fly_n »

Hello,
maybe installing the pracma libaray is not as intuitive, if RStudio is not installed.
Basically you open the R x64 console and enter
install.packages("pracma")

then it asks if your library shall be personal as the install folder is not writeable, which you confirm.
then it wants you to pick a repository, which is just point and click.

Kind regards,
Norman
Jean-Francois
Posts: 82
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Polar Alignment without Polaris (workflow)

Post by Jean-Francois »

Hello Norman,

Thank you for the scripts.
Concerning R ... I install R-Studio 1.3.1073 last August.
But for the path definition "default_Rscript" in the script "...R-3.6.2\\bin\\Rscript.exe" ... I have no Rscript.exe in my R-Studio installation.

For the pracma installation ... I do it, but it asks for rtools installation. I do it ... I hope that I have now pracma installed.

I will do tomorrow the first tests of your script.
I can do it with a real mount and the Sky-Simulator camera.

OK for the "no" use of the Stellariun software. Mean the script does not need Stellarium.
But the user is free to use (or not) a planetarium software in parallel with SharpCap.

Regards,
Jean-Francois
Jean-Francois
Posts: 82
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Polar Alignment without Polaris (workflow)

Post by Jean-Francois »

Hello Norman,

Concerning the Rscript ... I found it (several times) in the following directories:
- \R-4.0.2\bin
- \R-4.0.2\bin\i386
- \R-4.0.2\bin\x64

Regards,
Jean-Francois
fly_n
Posts: 26
Joined: Wed Oct 02, 2019 7:54 pm

Re: Polar Alignment without Polaris (workflow)

Post by fly_n »

Hello Jean-Francois,

as I understand it your path in the script would be then:

default_Rscript = r"C:\\Progra~1\\R\\R-4.0.2\\bin\\Rscript.exe"
default_pracma = default_pracma_part1 + r"\\R\\win-library\\4.0\\pracma"

If you installed pracma from the source code, it would need RTools to compile it.
If you call: install.packages("pracma") from the R console, it would use a pre-compiled binary and not need RTools.
(at least that is what I think :)

Also I found three things I have updated yesterday, as I was pushing everthing to my astro rig.
- In the R script astro_v31.R I overlooked one hardcoded path, that i changed from:
'E:/test/ps_positions.csv' to args[1]
- The labels with the correction angles did not update, when calculating a second or third test example. I had to re-arrange how the labels are created and updated for it to work.
- Lastly the second computer did not like the icon I provided, so I re-did the icon creation.

The updates are stored with the original links.
Filenames updated to astro_v32.R and no_polaris_no_problem_v028.py

I hope you are successful and it works for you as well.
Kind regards, Norman
Jean-Francois
Posts: 82
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Polar Alignment without Polaris (workflow)

Post by Jean-Francois »

Hello Norman,

I achieve to set the correct path changes in the script.
It is now working ... also at least the script is running, but ...

For seeing the movement of the telescope, I start CdC at the same time.
Also I have the Sky-Simulator, SharpCap and CdC connected to the ASCOM.Simulator.Telescop_for_.Net at the same time.
Wenn the script command a new position, I can follow in CdC the movement and then it appears a new simulated sky image in SharpCap.

After setting CdC sky view with the equatorial lines and centered to the zenith, I can follow the movement at constant DEC (it has to follow a "circle" in the chart).

I set several start value (ALT, AZ and AZ-end), but it does not perform as expected.
Maybe I misunderstand the start value meaning.

I expect that if AZ-end = 180, then the last position has to be at AZ = 180, means on the meridian.
(Note that I do not really like the "increment in Deg" ... I would prefer a fix number of position and the script calculate the delta RA between the start and end position.)


You can try with the following values (note we have fast the same location, we are leaving at ~25 km to each other):

Increment in deg = 10
Starting ALT = 0 => at the horizon
Starting AZ = 58 => (for us) it corresponds to near DEC = 20
AZ end = 179 => near the meridian
The script moves the telescope at the position AZ = 88 and ALT = 26 (not 58 and 0).
And the telescope stops at AZ = 137. (with delta = 10, the last position should be = 179 - 10 = 169)


Increment in deg = 10
Starting ALT = 0 => at the horizon
Starting AZ = 90 => "full" east
AZ end = 179 => near the meridian
The script moves the telescope at the position AZ = 83 and ALT = -5 (not 90 and 0).
And the telescope stops at AZ = 143. (with delta = 10, the last position should = 179 - 10 = 169)


For the plate solving ... I have for each test the first image without plate solving, all other fields are correctly solved.
(In my case I simulate in Sky-Simulator a camera with 1920x1200 pixel and a field of 160x100 arcmin = 2.7x1.7deg)

When I set in the script "FOV in Deg" = 2.7, I have no plate solving.
If I set 1.7, then it works (OK, for 1.5 or 2.0 it works too).

But the most important ... do we have a good polar alignment ? ... in the case of the Sky-Simulator ... it should be an error of 0 (+/- some error in the air refraction).

My results ... I have never 0 ... for example in the last test:
AZ corr = -0.39 and ALT corr = 0.38 ... that is above 20 arcmin ... that is too much error.
(On my EQ8, when I perform 2 times the polar alignment sequence after a 2 star alignment, then I have a better result).


Regards,
Jean-Francois
fly_n
Posts: 26
Joined: Wed Oct 02, 2019 7:54 pm

Re: Polar Alignment without Polaris (workflow)

Post by fly_n »

Hello Jean-Francois,

first of all it is good to see that the script can now be executed on your computer as well.
Secondly thank you very much for your detailed testing and feedback.

Yes your understanding of the AZ-end intent is correct.
I'll check your parameters and see what it does on my end.

Yes I think you are right, setting a number of pictures is more intuitive than specifying an increment angle and seeing what happens.

I haven't seen errors as large as you are seeing. However the mount does not seem to follow the intended circular path in your example, which is not filtered out by the algorithm. It assumes a circular motion.

I'll post back, when I have figured out where this unintended motion is coming from.
Hopefully it will also take care of the error you are seeing.

Kind regards, Norman
Jean-Francois
Posts: 82
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Polar Alignment without Polaris (workflow)

Post by Jean-Francois »

Hello Norman,

One point, to be checked, is the correct selection of the coordinate system … B1950, J2000, J2050, JNOW, JLOCAL.
Some software allows to select one coordinate system (ASCOM Telescope Simulator), other have something fix.
For example Prism software gives the objects coordinates in RA/DEC 2000 and RA/DEC apparent.
The "2000" is clear J2000, but the "apparent" ? mean JNOW + air refraction ? or only JNOW ?

It is the same with your script … what is the coordinate system ? maybe it depends what the telescope driver is using.
But are all other calculation performed in the same coordinate system ?

The precession is ~ 5000 arcsec per century, mean between 2000 and now, the coordinate of the star can "move" ~ 1000 arcsec = ~ 18 arcmin.

I will verify this by changing the coordinate system in the ASCOM driver and repeat several time the script.
One additional point is … the use or not of the air refraction in the ASCOM driver … it has to be checked too.
(In the Prism software, it is possible to force the air refraction calculation in Prism or to have it in the mount driver)

Regards,
Jean-Francois
Post Reply