-
Notifications
You must be signed in to change notification settings - Fork 10
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
Calibration misc #325
base: master
Are you sure you want to change the base?
Calibration misc #325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very sensible, I just have a couple questions about the time matching.
if total(matched_times_opt1 < 1) GT total(matched_times_opt2 < 1) then matched_times = matched_times_opt1 | ||
if total(matched_times_opt1 < 1) LT total(matched_times_opt2 < 1) then matched_times = matched_times_opt2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if neither are very good? should we error or warn if the best one is still way off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've included two errors to be explicit, one if no times matched and one if the times matched do not equal the number of timesteps in the data.
; In each matched timestep, match the baselines and fill a new, matched model array | ||
for time_i=0, data_n_time-1 do begin | ||
;suba is the subset of indices in the first array that are also in the second. | ||
;subb is the subset of indices in the second array that are also in the first. | ||
match, data_baseline_index[time_i*data_nbaselines:(time_i+1)*data_nbaselines-1], $ | ||
model_baseline_index[matched_times[time_i]*model_nbaselines:(matched_times[time_i]+1)*model_nbaselines-1], $ | ||
suba, subb | ||
for pol_i=0, obs.n_pol-1 do (*matched_model[pol_i])[*,suba+time_i*(data_nbaselines)] = (*vis_model_arr[pol_i])[*,subb+matched_times[time_i]*model_nbaselines] | ||
endfor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, so this takes care of the ones that don't match? what exactly happens if there are times that don't match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added an extra comment to be a little more clear.
Any unmatched transferred model times are discarded. The idea here is that you have a full model for all times, and you are matching it to imperfect, flagged data.
You may have noticed that I did not force timestep matching if the number of times is the same between the data and the model. I want to keep it somewhat flexible in case people are working with simulations. Ideally everyone fills in the metadata for simulations, but I'm not going to force them.
Added an extra option for the newer version of WODEN (which includes a better JDate convention after realizing there was such a huge difference). |
These are miscellaneous calibration changes:
All changes have been confirmed to work in PS.