-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hi Paul,
First, thank you for developing and maintaining Comrade. It's a fantastic tool for the community.
I'd like to propose a new utility function that I believe would be very helpful for diagnostics. While the current residual function is great for visual checks, a more detailed, tabular output would be invaluable for in-depth analysis.
I envision a function, perhaps named visibility_table() or something similar, that takes a posterior object and a specific set of model parameters (e.g., a single HMC sample, the MAP parameters, or the mean of the posterior) and returns a DataFrame.
This DataFrame would contain the following columns for each visibility point:
Time
Baseline
RR_data, RR_sigma, RR_model
RL_data, RL_sigma, RL_model
LR_data, LR_sigma, LR_model
LL_data, LL_sigma, LL_model
This feature would significantly improve the diagnostic workflow in two main ways:
Detailed Data Inspection: By having the data, model, and sigma values side-by-side for every baseline and time, it would be much easier to programmatically identify specific data points that are poorly fit by the model. This is crucial for diagnosing issues with the data itself (e.g., bad flags, calibration errors).
Custom Diagnostic Plots: The structured output would make it trivial to create custom diagnostic plots, such as plotting (data - model) / sigma as a function of (u,v)-distance for each polarization. This is a standard validation plot.
Thank you for your consideration!
Best regards,
Jongho