Skip to content
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

[MNT] - Name update for new version #205

Merged
merged 67 commits into from
Sep 23, 2023
Merged

[MNT] - Name update for new version #205

merged 67 commits into from
Sep 23, 2023

Conversation

TomDonoghue
Copy link
Member

@TomDonoghue TomDonoghue commented Apr 16, 2021

This PR is breaking update to overhaul the naming scheme of the module.

Principally, this includes changing the module name from fooof -> specparam, and all associated changes.

A note on reviewing

This PR necessarily has an extreme number changes, and it's not necessarily particularly easy or useful to try and read all the diffs. At this point, the main points that would be useful / interesting are to read through the name updates listed here and see if they make sense, and then perhaps install the module (pip install . works), and stress test the module, that things work as expected and naming and usage is user friendly.

Since this is a breaking update - now is a great time to dig in and change anything we want. So any ideas of changes to add, throw them out!

Name Changes

Objects:
FOOOF -> SpectralModel
FOOOFGroup -> SpectralGroupModel

Model attributes:
fooofed_spectrum_ -> modeled_spectrum_

Group:
get_fooof -> get_model

Data objects:
FOOOFResults -> FitResults
FOOOFSettings -> ModelSettings
FOOOFMetaData -> SpectrumMetaData

Functions
combine_fooofs -> combine_model_objs
compare_info -> compare_model_objs
average_fg -> average_group
fit_fooof_3d -> fit_models_3d

get_band_peak_fm -> get_band_peak
get_band_peak_fg -> get_band_peak_group
get_band_peak -> get_band_peak_arr
get_band_peak_group -> get_band_peak_group_arr

compute_pointwise_error_fm -> compute_pointwise_error
compute_pointwise_error_fg -> compute_pointwise_error_group
compute_pointwise_error -> compute_pointwise_error_arr

save_fm -> save_model
save_fg -> save_group

fetch_fooof_data -> fetch_example_data
load_fooof_data -> load_example_data

gen_power_spectrum -> sim_power_spectrum
gen_group_power_spectra -> sim_group_power_spectra

Function inputs:
fooof_obj -> model_obj

Notes

An alternative option for the object names is SpecParam and SpecParamGroup (or similar), which I think Ryan suggested. I don't think there's a huge difference, with just slight pros & cons between the options. PSD is shorter (a pro, I think), though somewhat less clear its a model object. I like the notion of having the objects be a different name from the module name (it's easier to search through code, etc, which became salient doing this update). We could even consider PSDModel or something.

Where relevant, we are using US (for example 'modeled'), even though this makes me sad.

ToDos

  • URLs that point to things like the docsite still need to be updated

@TomDonoghue TomDonoghue mentioned this pull request Apr 18, 2021
3 tasks
@fooof-tools fooof-tools deleted a comment from codecov-commenter May 5, 2021
@fooof-tools fooof-tools deleted a comment from codecov-commenter May 10, 2021
@fooof-tools fooof-tools deleted a comment from codecov-commenter Jul 22, 2023
@fooof-tools fooof-tools deleted a comment from codecov-commenter Jul 25, 2023
@fooof-tools fooof-tools deleted a comment from codecov-commenter Aug 3, 2023
@TomDonoghue TomDonoghue changed the title [WIP] - Name update for new version [MNT - Name update for new version Aug 7, 2023
@TomDonoghue TomDonoghue changed the title [MNT - Name update for new version [MNT] - Name update for new version Aug 7, 2023
@rdgao
Copy link
Contributor

rdgao commented Aug 19, 2023

Names look good to me, with a minor preference for SpecParam and SpecParamGroup (I don't know if you've decided on this already)

@fooof-tools fooof-tools deleted a comment from codecov-commenter Sep 13, 2023
@fooof-tools fooof-tools deleted a comment from codecov-commenter Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 Targetted for the specparam 2.0 release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants