Mm rework lingfeng#21
Conversation
…ed absolute sigma in Linear model
…odel error calculations
… Update trans_positions
Update data fitting logic: Compare observed data points with model parameters. If n_obs < n_params, return fill value for the parameters and infinity for the uncertainties; Otherwise, calculate parameters normally. If n_obs = n_params and absolute_sigma=False, return infinity for uncertainties (Same behavior as scipy curve fit).
…motion models. Update fitting logic: Provide multiple motion models, use the available model with the most number of parameters to fit according to the observed data points (i.e., choose the model with n_obs >= n_params). Removed motion_model_input and default_motion_model for clarity.
…atch_pos at_time into model; Renamed get_ functions into calc_ functions
… and get_batch_pos_at_time into model; Replaced MotionModel.fit_motion_model with MotionModel.fit; Rewrote and accelerated StarTable.fit_velocities with StarTable.fit_motion_model
…or plotly_stars; Added show_plot control for quiver residual plots
…cified in fixed_params_dict, will try to look for them in the table columns; For optional fixed params, will use the default value if not provided
…upport for 2d time arrays (if length==len(stars), assumes a corresponding relation instead of returning a 2D)
…ping regions; Added briteN control in MosaicSelfRef and MosaicToRef
…flystar into mm_rework_lingfeng
| if ('me' not in cols) and ('snr' in cols) and (error == True): | ||
| t_ref['me'] = 1.0 / t_ref['snr'] | ||
|
|
||
| # if ('me' not in cols) and ('snr' in cols) and (error == True): |
There was a problem hiding this comment.
We use this option in our microlensing work, and I would like to un-comment it. Does it cause an error in your use case?
There was a problem hiding this comment.
Oh certainly not. But it seems HST still uses 'me' column and in your case 'snr' column? Do we need to differentiate these above in line 649 too?
There was a problem hiding this comment.
Yeah, we need to be able to use 'snr' for Keck data. This has never been an issue with our HST data since those tables already have column headers. Do yours not?
…lumns -> meta data -> default value; Added random seed control in bootstrap functions.
| self.meta[param] = value | ||
|
|
||
| if raise_key_error: | ||
| raise KeyError(f"fit_motion_models: Missing required fixed parameter(s) for the motion models used: {', '.join(missing_params)}! Please provide them in fixed_params_dict or as columns in the table.") |
There was a problem hiding this comment.
Can this also check the table metadata for the value too before throwing an error? I think that will be much more common than a full data column
| return | ||
|
|
||
| def shift_reference_frame(self, delta_vx=0.0, delta_vy=0.0, delta_pi=0.0, | ||
| motion_model_dict={}): |
There was a problem hiding this comment.
These functions (class method and standalone) have been broken with these changes. A fix would be appreciated, but I can also make it if needed.
| trans_class=transforms.PolyTransform, | ||
| trans_args=[{'order': 2}, {'order': 2}], | ||
| trans_input=None, | ||
| trans_weighting=None, |
There was a problem hiding this comment.
please revert these weighting/weights keywords for user continuity
| else: | ||
| avg = np.ma.mean(val_2d_clip, axis=1) | ||
| std = np.ma.std(val_2d_clip, axis=1) | ||
| # FIXME: What does this part do? |
There was a problem hiding this comment.
Did you ever resolve this?
No description provided.