Jashcraf / katsu

Polarimetric Data Reduction and machine control for measuring the polarization of observatories
MIT License
3 stars 0 forks source link

DRR Polarimetry Procedure #14

Closed mileslucas closed 12 months ago

mileslucas commented 1 year ago

Hi @Jashcraf just using this issue to link to my code for your DRR polarimeter calibration plan.

Here is the whole file containing my for loops: https://github.com/scexao-org/vampires_control/blob/main/src/vampires_control/calibration/drr_calibration.py

https://github.com/scexao-org/vampires_control/blob/272128c4849eca6651f8047c1dde40cd7185a020/src/vampires_control/calibration/drr_calibration.py#L33-L34 Please confirm HWP angles and QWP angles match your experiment design (units are degrees)

https://github.com/scexao-org/vampires_control/blob/272128c4849eca6651f8047c1dde40cd7185a020/src/vampires_control/calibration/drr_calibration.py#L75 without plans to modulate the image rotator I will leave it fixed at 90 deg, which is nominal.

https://github.com/scexao-org/vampires_control/blob/272128c4849eca6651f8047c1dde40cd7185a020/src/vampires_control/calibration/drr_calibration.py#L82-L83 and confirming you want the fast-axes of both QWPs to stay aligned, i.e., make them as close to a HWP as possible

mileslucas commented 1 year ago

Question: would you prefer to modulate a rotatable linear polarizer that is effectively in the same place as the QWPs (LP is before QWP1)? This would allow me to leave the QWPs in the calibrated position which should GREATLY reduce the birefringence of the periscope. Let me know your thoughts

Jashcraf commented 1 year ago

The option of using the rotatable linear polarizer is compelling, particularly for compensating for the "unknown" part of the system. I played around with it a bit in the Mueller polarimetry code in the same notebook as my instrument plan, and it looks like you can recover the same elements of the Mueller matrix.

If you have time, could you take one set of data with the two QWPs rotating and one with the linear polarizer rotating at the same angles? If not, let's try your rotatable linear polarizer idea instead of the QWPs, and using the QWPs to compensate for the periscope.

Great idea :D

mileslucas commented 1 year ago

For posterity: I attempted the calibrations as discussed above on 2023/09/14 (HST) and ran into a bug with the HWP controller that was unrecovarable with the time I had available. This bug has been resolved and another attempt will be made on 2023/09/19 (HST)

An issue with my code pointed out by @Jashcraf was that we should not be iterating 24 steps of the analyzer for every step of the generator, but rather the generator and analyzer rotate together for a total of 24 steps. I will be updating my code appropriately which should make this very fast- it will be trivial to try this for all 6 standard filters in pupil imaging mode.


There is a physical limitation in the analyzer portion of this polarimeter (either the LP or QWP- both have the same limitation). This is that our rotation mounts are limited to a range of [0, 340) deg. To complicate this, the polarizer/waveplates are not mounted with their fast-axes aligned with the 0 deg axes of the mounts.

So, I created a heuristic that determines the validity of the an angle-

function num_illegal(N; method="LP")
    analyzer_angles = 5 * range(0, 180; length=N)
    if method == "LP"
        # polarizer is mounted with fast-axis at ~90 deg
        stage_angles = round.(analyzer_angles .+ 90, digits=2)
        return count(r -> mod(r, 360) > 340, stage_angles)
    elseif method == "QWP"
        offsets = [85 45]
        stage_angles = round.(analyzer_angles .+ offsets, digits=2)
        return count(r -> any(mod.(r, 360) .> 340), eachrow(stage_angles))
    end
end
julia> Ns = 16:30;

julia> @. Ns => num_illegal(Ns)
15-element Vector{Pair{Int64, Int64}}:
 16 => 0
 17 => 1
 18 => 1
 19 => 0
 20 => 1
 21 => 0
 22 => 1
 23 => 1
 24 => 1
 25 => 1
 26 => 2
 27 => 1
 28 => 1
 29 => 2
 30 => 1

julia> @. Ns => num_illegal(Ns; method="QWP")
15-element Vector{Pair{Int64, Int64}}:
 16 => 2
 17 => 1
 18 => 1
 19 => 1
 20 => 2
 21 => 2
 22 => 2
 23 => 0
 24 => 4
 25 => 2
 26 => 0
 27 => 3
 28 => 4
 29 => 1
 30 => 2

So using the linear polarizer 21 steps is the largest number of steps that has no illegal configurations, so there would be no gaps in the DRR grid. That being said, for the LP mode with 24 steps only one gets skipped. For the QWP 23 steps is the closest to 24.

So can you let me know whether it is important to have a evenly-spaced spaced grid? If not, for the LP mode I'll use 24 steps and you'll have one gap and for the QWP mode I'll use 23 steps and have no gaps.

Jashcraf commented 1 year ago

I'm unsure of the importance of even grid spacing, but I think as long as the relative angular steps are maintained it should be fine. e.g. psa_rotation = 5*psg_rotation. Go ahead and try without the evenly-spaced grid.

mileslucas commented 12 months ago

Data for each filter was taken using the rotating linear polarizer (ran out of time to try QWPs). I have back-subbed, flat-normed, and median-collapsed the raw frames and put them in this zenodo dataset: https://zenodo.org/record/8362398