-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analytical Gaussian fit for 5 and 7 points profiles #253
Comments
Since observing time is limited by the helicopter fly times, we have agreed that one high quality 5-point observation for the other 3 coronal lines served to the community (637 nm, 706 nm and 789 nm) are much better than two 3-point observations that do not capture the info needed to fit the line profile except under optimal conditions. The observing program will scan the lines at these locations:
|
We need to perform an analytical gaussian fit for all UCoMP data. If only 3 wavelength position are present, this will be the end of it. If more than 3 wavelength positions are present, this analytical fit will be used as first guess for the least square fit. The three wavelengths to be used for the analytical gaussian fit are not necessarily the three center wavelengths. We will use the closest wavelengths to the "nominal" reference wavelengths used for the 3-point data: ref_blue = 1074.59 ref_blue = 1079.69 ref_blue = 789.33 ref_blue = 637.35 ref_blue = 706.14 This is what I use in my code to find the closest wavelength position:
where wave is the array with the wavelength positions and nearest_element.pro is the routine written by Mankoff *reference lines updated per discussion below |
Making a new option,
|
OK, here is potential problem for the current method. Center wavelength is 637.4 and offset is +/- 0.06, so 637.34 and 637.46. For the below file, the method uses extensions 4, 5, and 7:
637.34 and 637.46 are both directly in the middle of two wavelengths and round-off is giving me the higher one in both cases. |
This was a special scan. It can be fixed by selecting 637.40 +/- 0.05. However, I see an issue on 2024 04 09, when the red and blue wavelengths were not symmetric There is a not a number that works well in this case. We need to do the following: This should select: Unfortunately, uneven spacing like on 2024 04 09 will happen again by mistake or on purpose to avoid certain wavelength positions. |
@detoma What are the "correct" human-selected wavelengths from the 20240330.211133 file? Based on the recommendation that +/-.05 would work better, it sounds like the correct answer is to round toward the central wavelength. Is that the correct interpretation? |
Can I say, round towards the central wavelength when within 0.001? Floating point numbers can't be reliably compared for equality/non-equality in these edge cases: IDL> print, (0.55 - 0.45) gt (0.45 - 0.35)
1 |
The scan for 2024 03 30 was correct. We scanned a wide wavelength range to find the line with equally spaced steps. There was a human error in selecting wavelengths for 2024 04 09 which made the steps NOT equally spaced. This is likely to happen again. We cannot round towards the central wavelength. In order for the analytic gaussian fit to work, we want the red and blue wings to be ~0.05-0.06 nm apart from the center wavelength for 637.40nm. Try to implement what I suggested above. It should work. We need to be careful going forward about adopting new wavelength scans. |
So, 637 should always use +/- 0.05? or just for this day? Doesn't this just move the problem to different wavelengths? I don't know how to reconcile the following two statements:
and
|
It is not always the three center wavelengths that are the best. See my updated comments to below. I think the best approach is to define independently the blue and red reference wavelengths. The spacing adopted on 2024 04 09 for 637.40nm was a mistake. Likewise on 2024 04 09, we took an extra point in the 1079nm scan by mistake. We need to account for human errors and there may be cases when we want them unequally spaced. I am trying to find a strategy that works for what was done in 2021-2022 and 2024. |
We need to define the blue and red reference wavelength independently for flexibility. This will allow us to handle wavelength scans that are intentionally or unintentionally non evenly spaced. With a proper epoch, this will fix the issue for 2024 04 09. I will test again which are the best three wavelength for 637.40 the day after the eclipse and update the ticket later. |
It seems the wavelengths are listed incorrectly in the summary file but are correct in the 637 file. Mike: can you please look into this? Is that a rounding error of some sort? The wavelength in the 637 file are the following: For the day after the eclipse, we want to use these wavelengths for the analytical fit: 637.365 637.400 637.435 Our analytical gaussian fit expects the 3 wavelengths to be at the same distance, so I am glad the data is correct, otherwise the fit would have failed. I updated the reference red and blue lines for 637. |
@detoma Are you saying the wavelengths are not correct in the 20240409 637 summary file, i.e.,
|
This needs to change to non-symmetric offset, though. So there will be a red_offset and blue_offset value for each wave_region.
Thank you Mike. This looks correct. |
The velocity was coming out with opposite sign compared to what expected. This was because of a bug, now fixed, that flipped the red and blue reference wings. Running a test in |
The test run is complete for 20240409 in |
I had red/blue reference wavelengths reversed for each wave region.
This seems to work fine based on data in 2022 but cannot compare velocities in 2024 because the files in process/ and the ones in process.analytic-gaussian/ are processed with two different distortions and are very different. I need two files in 2024 where the only difference is the analytical algorithm. |
OK, |
I cannot find two images with the same distortion: process and process.old-dist use a different distortion. The velocities are very different, but I cannot tell how much is from the distortion and how much from the wavelength selection. I am going to pass this issue to Mike. He is the best one to test it and make sure it works since he wrote the code. |
Those runs should both use the old distortion. From the
The distortion file was not recorded previously, i.e., in |
Mike is better if you do this. |
The new wavelength positions for the 5 and 7 points are not equally spaced.
The code needs to handle it when it computes the
d_lambda
for the analytical gaussian fit and we need to implement a least-square gaussian fit to take advantage of the extra points.The 3 wavelengths to use for the analytical gaussian fits needs to be specified. For the 5-points, we will use the 3 center wavelengths. For 1074 and 1079 they will be:
For the 7-points the we will use the wavelength position 2, 4 and 6, i.e., we will skip the two farther and the two closer points to the center wavelength. For 1074 and 1079 they will be:
that are the same wavelengths as in the 3-point wave program.
Tasks
wing_offset
option into{red,blue}_reference_wavelength
optionsREF_RED
andREF_BLUE
FITMETHD
: "analytic", "3-term", "4-term"3-term
and4-term
resultsThe text was updated successfully, but these errors were encountered: