mantle-convection-constrained / terratools

Tools to read, analyse and visualise models written by the TERRA mantle convection code
https://terratools.readthedocs.io/en/latest/
MIT License
6 stars 5 forks source link

Rename '1D profile' methods #130

Closed anowacki closed 9 months ago

anowacki commented 9 months ago

Previously, we had a get_ method which returned the radial or 1D profile of a model at a certain point, but get_ methods are by convention those which return the data inside a model, possibly for editing. In updating this name, a simple change to 1d_profile was not possible under Python's naming rule so another name was needed. This commit changes TerraModel.get_1d_profile to TerraModel.radial_profile, and for consistency also changes TerraModel.mean_1d_profile to TerraModel.mean_radial_profile.

As an alternative I considered profile_1d, but that didn't feel right. A '1D profile' is really tautologous, since a profile is by definition 1D. Hence adding information about in which direction the profile was running seemed most useful. Finally therefore we settle on TerraModel.radial_profile as the best alternative.

Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable.

Describe what you did in this PR and why you did it.

For all pull requests:

For new features/models or changes of existing features:

anowacki commented 9 months ago

@jamespanton93 I've opened this as a request for feedback. If you're happy with the changes, then I think our API is now pretty much ready.

anowacki commented 9 months ago

Docs build seems to have failed for an unrelated reason.