Skip to content

Mm rework lingfeng#21

Open
hustonm wants to merge 106 commits into
mm_reworkfrom
mm_rework_lingfeng
Open

Mm rework lingfeng#21
hustonm wants to merge 106 commits into
mm_reworkfrom
mm_rework_lingfeng

Conversation

@hustonm

@hustonm hustonm commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

No description provided.

wei-lingfeng and others added 30 commits September 9, 2025 20:10
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
Comment thread flystar/starlists.py
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):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread flystar/align.py
Comment thread flystar/align.py Outdated
Comment thread flystar/startables.py
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.")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread flystar/startables.py
return

def shift_reference_frame(self, delta_vx=0.0, delta_vy=0.0, delta_pi=0.0,
motion_model_dict={}):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread flystar/align.py
trans_class=transforms.PolyTransform,
trans_args=[{'order': 2}, {'order': 2}],
trans_input=None,
trans_weighting=None,

@hustonm hustonm Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert these weighting/weights keywords for user continuity

Comment thread flystar/startables.py
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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you ever resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants