Software for understanding the design of solar telescopes

The place for all your solar software; capture, stacking, post processing, ancillaries etc. It's all up for discussion here!
Post Reply
george9
Im an EXPERT!
Im an EXPERT!
Posts: 362
Joined: Tue Jan 26, 2016 1:28 am
Has thanked: 189 times
Been thanked: 444 times

Software for understanding the design of solar telescopes

Post by george9 »

[I posted the following on CN and realized I should repost here. George]

I was working on my solar setups and wanted a way to simulate what I would see before building. I downloaded a couple of free ray-trace systems, and I am still in the process of learning them with manuals and watching videos. I am not sure if they can handle an etalon and the effect of tilt on their CWL and FWHM. I decided to build my own for now, figuring the best way to learn is to build it. I share it here in case it is useful.

With this set of routines, you design a telescope as a set of lenses and add some filters. You run a bunch of light rays through the system and look at the performance metrics. You could graph the output, but I am fine with the simpler table-based metrics.

A simple scope with an internally mounted 50% sized air-spaced etalon using a collimation lens looks like this:

# create 50mm diameter wavefront near H-alpha (6562.8)
r2 <- r1 <- rayarray(25, # objective radius in mm
pi*seq(0,18,2)/(60*180) # solar angles in radians
0,
seq(6542.8,6582.8,0.02)) # wavelengths in Angstroms
r2 <- refract(r2,0,400) # refract through f/8 lens 50mm
r2 <- stopray(r2,0,25)
r2 <- refract(r2,200,-200) # collimate with 25mm lens halfway back
r2 <- stopray(r2,200,12.5)
r2 <- lorentz(r2,6562.8,0.7,1,1) # 0.7A air-spcced etalon 25mm (50%)
r2 <- stopray(r2,200,12.5)
r2 <- lorentz(r2,6562.8,8,1,1) # add a two-cavity blocking filter
r2 <- lorentz(r2,6562.8,8,1,1)

Halphametrics(r2) # check cwl, fwhm, selectivity

The output looks like this:

xpos ypos dcwl fwhm sel htransm
1 0.000 0 0.00 0.68 0.4333140 0.6602013
2 0.125 0 0.00 0.68 0.4333001 0.6556937
3 0.250 0 -0.02 0.68 0.4330943 0.6554449
4 0.375 0 -0.04 0.68 0.4322038 0.6513754
5 0.500 0 -0.08 0.66 0.4298001 0.6454880
6 0.625 0 -0.12 0.66 0.4246971 0.6393128
7 0.750 0 -0.16 0.68 0.4152945 0.6220940
8 0.875 0 -0.22 0.68 0.3994792 0.6001157
9 1.000 0 -0.28 0.68 0.3745489 0.5644601
10 1.125 0 -0.36 0.68 0.3375223 0.5082947

We see as we move from the center of the Sun (xpos=0) to the photospheric perimeter (xpos=1) and beyond to prominences, the bandwidth is around 0.7A, the center frequency shifts from 0 to 0.28A blueward, and the selectivity is around 0.43. I use some approximations, so it does not exactly match Christian Viladrich's output, but it is close.

I show lots of other examples in the attached file. Front-mounted single and double-stack air-spaced, internally collimated air-spaced, rear-mounted telecentric mica-spaced, under-sized internal air-spaced, an etalon on an f/30 scope (does terribly), and a C8 with something like a Quark. I am able to code a scope and test it in under 5 minutes.

What it DOES handle is: lenses tilting rays through the filters, Lorentzian filters affected by tilt, two-cavity and higher filters by pairing Lorentizians, and square wave filters (ignoring tilt for now). Right now a lens is a refraction and an optical stop. I should really create a "lens" function that does both. It is good at figuring out what will my collimation lens or telecentric or Barlow do to my etalon performance. It handles air-spaced and mica-spaced etalons. Mirror telescopes like an SCT are implemented by modeling each mirror as a lens.

What it does NOT handle is: most important it ignores lens aberrations. It uses a geometric solution for perfect thin lenses. A lens is completely described by its focal length (negative or positive), and optionally its diameter. The code for refracting rays is simple. See where a ray hits the lens, shift the ray to the middle where the lens will not bend it, and you know all the parallel rays coming into the lens will intersect at the lens's native focal plane. Now you have two points and you can solve for the newly bent ray. But this all ignores chromatic aberration, spherical aberration, astigmatism, and field curvature. It also assumes the lenses and filters are colinear.

I used the R programming language because it is free and I am a moderately familiar. APL is my real language, but no one would be able to use it. As you can see from the code, without the comments, it is a minimal number of lines of code and would be quick to port to Python or Julia for someone who knows those languages.

As currently set up, one run is 9 million rays (rows) and takes 20 seconds on my MacBook.

A few disclaimers. Therea are no warranties, and I am sure there are bugs in there. At best, it is just an approximation. Using this to better understand how a solar telescope works is reasonable. Building a solar telescope from this is not reasonable. Probably most useful would be simply reading and understanding the code and designing some systems.

(There are two copies of each file, ending in R and R2. The "R2" versions may be more Windows friendly. I can try again if that fails. The "Etalon design R" file has the code and is normally called "Etalon design.R" and can be executed in R Studio or native R. Then I show the output of running it for the examples.)

George
Attachments
Output of Etalon design R.txt
(12.59 KiB) Downloaded 92 times
Etalon design R.txt
(18.33 KiB) Downloaded 86 times
Output of Etalon design R2.txt
(13.04 KiB) Downloaded 81 times
Etalon design R2.txt
(18.88 KiB) Downloaded 89 times


george9
Im an EXPERT!
Im an EXPERT!
Posts: 362
Joined: Tue Jan 26, 2016 1:28 am
Has thanked: 189 times
Been thanked: 444 times

Re: Software for understanding the design of solar telescopes

Post by george9 »

Here are some interpretations of the outputs:

1. Check a front-mounted air-spaced 0.7A etalon

xpos ypos dcwl fwhm sel htransm
1 0.000 0 0.00 0.68 0.4333140 0.6602013
2 0.125 0 0.00 0.68 0.4333131 0.6602003
3 0.250 0 0.00 0.68 0.4333011 0.6601851
4 0.375 0 0.00 0.66 0.4332491 0.6601187
5 0.500 0 -0.02 0.68 0.4331095 0.6599395
6 0.625 0 -0.02 0.66 0.4328154 0.6595611
7 0.750 0 -0.04 0.68 0.4322802 0.6588719
8 0.875 0 -0.06 0.66 0.4313974 0.6577344
9 1.000 0 -0.08 0.66 0.4300396 0.6559836
10 1.125 0 -0.08 0.66 0.4280565 0.6534254

Going from the solar disk center (xpos=0) to the edge (xpos=1) and beyond, the shift in CWL is minimal at 0.08 (dcwl). You begin to see a sweet spot around 0.25. The bandwidth is as expected, around 0.7 (fwhm). The selectivity is typical for a single stack 0.7A etalon around 40% (sel), which means about 40% of the light that you see comes from the chromosphere. The rest is photosphere, which is why it is somewhat washed out. The transmission in H-alpha is high at 66% (htransm), but this just shows what is lost due to vignetting and being off band from the etalon. It ignores that etalons combined with blocking filters may have only 10% transmission at peak. That would imply a 6% transmission overall here.


2. Check a double-stacked front-mounted air-spaced etalon

xpos ypos dcwl fwhm sel htransm
1 0.000 0 0.00 0.44 0.7983560 0.4901101
2 0.125 0 0.00 0.44 0.7983539 0.4901095
3 0.250 0 0.00 0.42 0.7983228 0.4900997
4 0.375 0 0.00 0.42 0.7981887 0.4900569
5 0.500 0 -0.02 0.44 0.7978279 0.4899410
6 0.625 0 -0.02 0.42 0.7970672 0.4896958
7 0.750 0 -0.04 0.44 0.7956831 0.4892478
8 0.875 0 -0.06 0.42 0.7934004 0.4885047
9 1.000 0 -0.08 0.42 0.7898907 0.4873523
10 1.125 0 -0.08 0.42 0.7847684 0.4856498

Now let's double stack the filter. We see similar low offset (dcwl 0.08). The bandwidth is now lower at 0.44A, which drives the selectivity to a great 80%. The transmission is a little lower but not bad (50%). Many people see this as the ideal H-alpha scope.


3. Check a collimated 50% air-spaced etalon using a collimating lens on an f/7 scope

xpos ypos dcwl fwhm sel htransm
1 0.000 0 0.00 0.68 0.4333140 0.6602013
2 0.125 0 0.00 0.68 0.4333001 0.6556937
3 0.250 0 -0.02 0.68 0.4330943 0.6554449
4 0.375 0 -0.04 0.68 0.4322038 0.6513754
5 0.500 0 -0.08 0.66 0.4298001 0.6454880
6 0.625 0 -0.12 0.66 0.4246971 0.6393128
7 0.750 0 -0.16 0.68 0.4152945 0.6220940
8 0.875 0 -0.22 0.68 0.3994792 0.6001157
9 1.000 0 -0.28 0.68 0.3745489 0.5644601
10 1.125 0 -0.36 0.68 0.3375223 0.5082947

Now we don't want to spend so much on our etalon, so we make it internal at 50% the size of the objective lens. The bandwidth, selectivity, and transmission are not far from the front-mounted etalon, but the shift in wavelength is bigger, reaching -0.28 at the solar surface. Therefore, the sweet spot is around the size of the Sun. Keep in mind that you need not tune the Sun's center to 6562.8A. I you shift it red-ward, then the perimeter of the Sun won't be so blue. But the net experience after you do that is a sweet spot about the size of the Sun.


4. Check an f/8 scope with a 4x telecentric making it f/32 with 0.7A solid etalon

xpos ypos dcwl fwhm sel htransm
1 0.000 0 -0.16 0.72 0.4054701 0.6236230
2 0.125 0 -0.16 0.72 0.4054701 0.6236230
3 0.250 0 -0.16 0.72 0.4054701 0.6236230
4 0.375 0 -0.16 0.72 0.4054701 0.6236230
5 0.500 0 -0.16 0.72 0.4054701 0.6236230
6 0.625 0 -0.16 0.72 0.4054701 0.6236230
7 0.750 0 -0.16 0.72 0.4054701 0.6236230
8 0.875 0 -0.16 0.72 0.4054701 0.6236230
9 1.000 0 -0.16 0.72 0.4054701 0.6236230
10 1.125 0 -0.14 0.74 0.4086296 0.5467027

Let's put the etalon behind the scope after a telecentric lens. Start with a 0.7A mica filter so we can compare to before. We see a constant shift in frequency that can be simply tuned away by tuning the filter a little red-ward. That's the benefit of telecentric: no sweet spot. The bandwidth is a little wider, over 0.7A, but not bad. The selectivity is a little lower but still near 40%. And the transmission is similar.


5. Check an f/8 scope with a 4x telecentric making it f/32 with 0.3A solid etalon

xpos ypos dcwl fwhm sel htransm
1 0.000 0 -0.16 0.42 0.6265643 0.3614563
2 0.125 0 -0.16 0.42 0.6265643 0.3614563
3 0.250 0 -0.16 0.42 0.6265643 0.3614563
4 0.375 0 -0.16 0.42 0.6265643 0.3614563
5 0.500 0 -0.16 0.42 0.6265643 0.3614563
6 0.625 0 -0.16 0.42 0.6265643 0.3614563
7 0.750 0 -0.16 0.42 0.6265643 0.3614563
8 0.875 0 -0.16 0.42 0.6265643 0.3614563
9 1.000 0 -0.16 0.42 0.6265643 0.3614563
10 1.125 0 -0.14 0.40 0.6296168 0.3162632

Now pay more for a 0.3A mica filter. We again we no shift in the telecentric. The bandwidth is now 0.42A, not as good as the 0.3A we thought we paid for, but still good. It results in very good selectivity at 62%, but not nearly as good as the double stack 0.7A front-mounted. Transmission is starting to fall at 36%, about half of the front mount.


6. Air-spaced etalon on an f/30 scope

xpos ypos dcwl fwhm sel htransm
1 0.000 0 -0.44 1.10 0.2510126 0.4485158
2 0.125 0 -0.44 1.10 0.2505710 0.4480735
3 0.250 0 -0.44 1.10 0.2492492 0.4467432
4 0.375 0 -0.44 1.12 0.2470572 0.4445166
5 0.500 0 -0.42 1.14 0.2440150 0.4413838
6 0.625 0 -0.42 1.18 0.2401565 0.4373400
7 0.750 0 -0.40 1.20 0.2355336 0.4323925
8 0.875 0 -0.38 1.22 0.2302174 0.4265655
9 1.000 0 -0.38 1.26 0.2242966 0.4199031
10 1.125 0 -0.36 1.32 0.2178711 0.4124669

If I read that etalons need f/30, why not just make an f/30 scope. Let's stick my air-spaced 0.7A etalon there. There is a big shift, but it's relatively constant, so we can tune that out. BUT look at the bandwidth, now 1.1A. That's wide, leading to a selectivity of only 25%, that is, mostly photospheric light. The transmission is moderate.


7. Check a collimated 33% air-spaced double-stack etalon

xpos ypos dcwl fwhm sel htransm
1 0.000 0 0.00 0.44 0.79835601 0.485664657
2 0.125 0 -0.02 0.44 0.79785730 0.484263426
3 0.250 0 -0.06 0.44 0.79034853 0.473283340
4 0.375 0 -0.14 0.44 0.75696822 0.438371825
5 0.500 0 -0.26 0.46 0.66136807 0.382740653
6 0.625 0 -0.40 0.52 0.46189602 0.271211576
7 0.750 0 -0.58 0.64 0.23840394 0.138428192
8 0.875 0 -0.80 0.80 0.10732840 0.057564639
9 1.000 0 -1.18 1.02 0.04534361 0.020358878
10 1.125 0 -1.62 1.28 0.01874305 0.006640106

Let's put a smaller air-spaced etalon in a scope, and let's double stack it. In fact, let's try a 155mm objective with a pair of 0.7A etalons, one 52mm and subsequent one 35mm. We see that the wavelength shifts a bit, going from 0 to 0.26 by half a solar radius (xpos=0.5). That means we should see a sweet spot. The bandwidth is good at 0.44A near the center, and selectivity is great at 80% near the center. Transmission is near 50%. So as long as we are happy with seeing only a quarter of the Sun at a time (half times half), this is a great set up.


8. Try a C8 SCT with something like a Quark with 4.3x true telecentric (unlike Quark) and 0.7A solid etalon

xpos ypos dcwl fwhm sel htransm
1 0.000 0 -0.08 0.68 0.4264192 0.57867865
2 0.125 0 -0.08 0.68 0.4272619 0.39927516
3 0.250 0 -0.10 0.68 0.4250275 0.21197141
4 0.375 0 -0.14 0.68 0.4184056 0.06532813
5 0.500 0 0.00 40.00 NaN 0.00000000
6 0.625 0 0.00 40.00 NaN 0.00000000
7 0.750 0 0.00 40.00 NaN 0.00000000
8 0.875 0 0.00 40.00 NaN 0.00000000
9 1.000 0 0.00 40.00 NaN 0.00000000
10 1.125 0 0.00 40.00 NaN 0.00000000

Modeling the Celestron C8 SCT as a set of lenses, and putting in something like a Quark, we get a small field of view (around a quarter solar radius based on the transmission being so low at 0.375) due to vignetting, but the shift, bandwidth, and selectivity are reasonable within that view. Now the Quark is not a full telecentric, so there might be some sweet spot on top of that in a real Quark.

George


User avatar
marktownley
Librarian
Librarian
Posts: 43492
Joined: Tue Oct 18, 2011 5:27 pm
Location: Brierley Hills, UK
Has thanked: 22126 times
Been thanked: 11277 times
Contact:

Re: Software for understanding the design of solar telescopes

Post by marktownley »

Thanks George! Does the software graph those tables? I go number blind with those blocks of data.


Image
http://brierleyhillsolar.blogspot.co.uk/
Solar images, a collection of all the most up to date live solar data on the web, imaging & processing tutorials - please take a look!
User avatar
GreatAttractor
Almost There...
Almost There...
Posts: 967
Joined: Sat Jun 01, 2013 1:04 pm
Location: Switzerland
Has thanked: 762 times
Been thanked: 758 times

Re: Software for understanding the design of solar telescopes

Post by GreatAttractor »

Nice work!

Some of the tables pasted into and plotted in LibreOffice Calc (X axis = "xpos"):

3. collimated 50% air-spaced etalon using collimating lens on an f/7 scope
plot3.png
plot3.png (33.24 KiB) Viewed 1906 times
6. air-spaced etalon on f/30 scope
plot6.png
plot6.png (24.71 KiB) Viewed 1906 times


My software:
Stackistry — an open-source cross-platform image stacker
ImPPG — stack post-processing and animation alignment
My images

SW Mak-Cass 127, ATM Hα scopes (90 mm, 200 mm), Lunt LS50THa, ATM SSM, ATM Newt 300/1500 mm, PGR Chameleon 3 mono (ICX445)
george9
Im an EXPERT!
Im an EXPERT!
Posts: 362
Joined: Tue Jan 26, 2016 1:28 am
Has thanked: 189 times
Been thanked: 444 times

Re: Software for understanding the design of solar telescopes

Post by george9 »

Thanks, GreatAttractor! What a simple and nice solution on the graphs. Let me think about including exactly that. Here is an update:

Here is a new version. Christian V and I compared outputs, and we are in good agreement now. Not exact, but close.

A few changes:

Halphametrics has a few enhancements

1. CWL is now calculated using the power-weighted mean wavelength. The good news is that it is more accurate, but the bad news is you have to be sure that your input wavelengths cover a wide-enough range to estimate it well. I originally used the mode of the transmission versus wavelength curve, but that is off when the curve is skewed and also when too few x-y points are used, causing bumps. I now show both versions, and if they disagree much, it is worth looking into it.

2. FWHM is now calculated using interpolation. The original version was completely non-parametric but was biased low. I include the old version as FWHM2, but I removed the bias. (I could probably drop one of them.)

3. An optional plt flag plots the transmission versus wavelength curve for light coming from the center of the Sun. I should switch to GreatAttractor's approach.

4. The function generalmetrics is similarly changed.

Tilt and shift

5. You can now tilt your etalon and also shift optics off the main axis. So for example, you can test an SCT with an off-axis ERF. Keep in mind that if you tilt, then you can no longer get away with just testing one radius of the Sun. You need points all along half the Sun's surface due to the loss of much of the symmetry.

6. The squarewave filter now shifts CWL with tilt.

Other comments

7. There are more examples.

8. Keep in mind there is no reason to limit its use to H-alpha. CaK and coronal 5303 are also testable. Just use generalmetrics instead of Halphametrics for the results. But remember that the big problem in CaK is optical aberrations, which this software does not model.

I might add new things periodically, but it is pretty much done (other than the graphs). It is amazing how well it works for so little time and lines of code put in. To do very much better, I would probably just get a formal ray trace program. This is just a quick-and-dirty, "what would happen if" that gives an answer in a couple of minutes of programming and running.

George
Attachments
Etalon design v2 R.txt
(24.75 KiB) Downloaded 86 times


george9
Im an EXPERT!
Im an EXPERT!
Posts: 362
Joined: Tue Jan 26, 2016 1:28 am
Has thanked: 189 times
Been thanked: 444 times

Re: Software for understanding the design of solar telescopes

Post by george9 »

I put in some plotting functions along the lines of GreatAttractor and reran the examples. I show 2 Angstroms around H-alpha in one plot taken from the center of the Sun. For the other, I plotted the metrics versus the distance of the observed piece of the Sun from the Sun's center, measured in solar radii. CWL+1 means I took the longest wavelength and set that at 1.0. Then I plotted how the wavelength changed from the Sun's center to the edge. A difference of 0.25 is noticeable. FWHM is plotted but if it is over 1.2 Angstroms, it won't be visible. Select is Christian's selectivity. Transm is the percent of light transmitted within plus or minus 0.5 Angstroms of H-alpha.

For some examples I did not re-center the curve on H-alpha, but I could or should have.

The source code is attached.

George


Front-mounted H-alpha air-spaced etalon
front2.jpeg
front2.jpeg (24.74 KiB) Viewed 1802 times
front1.jpeg
front1.jpeg (30.66 KiB) Viewed 1802 times

Double-stacked front-mounted air-spaced etalon
double2.jpeg
double2.jpeg (24.67 KiB) Viewed 1802 times
double1.jpeg
double1.jpeg (30.08 KiB) Viewed 1802 times


Collimated 50% air-spaced etalon
50collimated2.jpeg
50collimated2.jpeg (24.64 KiB) Viewed 1802 times
50collimated1.jpeg
50collimated1.jpeg (31.47 KiB) Viewed 1802 times

Telecentric f/32 with 0.7A solid etalon
7telecentric2.jpeg
7telecentric2.jpeg (24.23 KiB) Viewed 1802 times
7telecentric1.jpeg
7telecentric1.jpeg (31.17 KiB) Viewed 1802 times


Telecentric f/32 with 0.3A solid etalon
3telecentric2.jpeg
3telecentric2.jpeg (24.13 KiB) Viewed 1802 times
3telecentric1.jpeg
3telecentric1.jpeg (30.66 KiB) Viewed 1802 times


Air-spaced etalon on an f/30 scope
30air2.jpeg
30air2.jpeg (24.79 KiB) Viewed 1802 times
30air1.jpeg
30air1.jpeg (30.35 KiB) Viewed 1802 times


Collimated 33% air-spaced double-stack etalon
33collimated2.jpeg
33collimated2.jpeg (24.7 KiB) Viewed 1802 times
33collimated1.jpeg
33collimated1.jpeg (36.88 KiB) Viewed 1802 times

Mica 0.3A etalon on an f/10 scope
10solid2.jpeg
10solid2.jpeg (24.88 KiB) Viewed 1802 times
10solid1.jpeg
10solid1.jpeg (26.61 KiB) Viewed 1802 times

Collimated 50% 0.3A mica etalon
50collimated3mica2.jpeg
50collimated3mica2.jpeg (24.5 KiB) Viewed 1802 times
50collimated3mica1.jpeg
50collimated3mica1.jpeg (30.17 KiB) Viewed 1802 times

Telecentric f/28 with 0.3A solid etalon shifted 0.2A
28telecentric3mica2.jpeg
28telecentric3mica2.jpeg (25.17 KiB) Viewed 1802 times
28telecentric3mica1.jpeg
28telecentric3mica1.jpeg (30 KiB) Viewed 1802 times
Attachments
Etalon design R.txt
(25.44 KiB) Downloaded 92 times


george9
Im an EXPERT!
Im an EXPERT!
Posts: 362
Joined: Tue Jan 26, 2016 1:28 am
Has thanked: 189 times
Been thanked: 444 times

Re: Software for understanding the design of solar telescopes

Post by george9 »

Here is a fun observation from the last two designs in the previous post. They both use a 0.3A solid etalon. One uses a collimated design with an etalon that is 50% the size of the objective. The other uses a telecentric design and need not be so wide.

The collimated one is centered well on H-alpha, has a little bit of shift at the edges of the Sun but not enough to see a sweet spot, very good bandwidth at about 0.3A, and selectivity of 0.65 (better than air-spaced SS=0.43, worse than air-spaced DS=0.80).

The telecentric one is centered on H-alpha because I shifted it 0.2A red-ward in the design, has no sweet spot at all, has significantly worse bandwidth at 0.5A (and the curve looks much wider than the collimated one), and yet a selectivity of 0.64, almost identical to the collimated design.

How can it be that a design with an effective bandwidth of 0.3 looks the same as one with 0.5? This just highlights that it is not all about bandwidth, it is about the shape of the transmission curve especially in the tails. A 0.5A-wide SS filter actually looks like the attached plot; notice how high the tails are for this one compared to the plot for 0.3A telecentric (which has a 0.5A effective FWHM) in the previous post.

0.5A solid etalon
Rplot.jpeg
Rplot.jpeg (24.42 KiB) Viewed 1773 times

The telecentric design shifts part of the wavefront blue-ward, but by less than 0.2A. Shifting the curve by 0.2A barely hurts the selectivity, which uses a window 1A wide. If you add together light from the center of the objective with light from the edges, you superimpose a set of narrow curves resulting in a FWHM of 0.3+0.2=0.5. But the tails remain almost as low as for the unshifted filter. So it is like a 0.3A filter where the middle is stretched by 0.2A, but the tails remain the same. The FWHM rises, but there is no effect on the view.

So the telecentric design works well despite its nominally worse FWHM.

George


Post Reply