There are two kinds of methods which give you information about
the contents of a TerraModel:
Methods starting with get_ return a reference to something held
within the model. Hence things returned
by getters can be modified and the TerraModel instance is also
modified. For example, get_field("vp") returns the array containing
the P-wave velocity for the whole model, and you can update any values
within it. You should not change the shape or length of any arrays
returned from get_ methods, as this will make the internal state
of a TerraModel inconsistent.
Methods which are simply a noun (like number_of_compositions)
return a value and this cannot be used to change the model.
However, I note we now have get_1d_mean, which doesn't conform to this (the returned values can't be used to update the model). Can we rename it mean_1d_profile?
get_1d_profile on the other hand works just as expected, but it takes coordinates in the order lat, lon, rather than lon, lat like everywhere else in the module. Can this be changed?
Just wanted to make sure you saw this, @jamespanton93 . I'm happy to make these changes, but didn't want to make them until you were aware and approved.
Per the docstring for a
TerraModel
:However, I note we now have
get_1d_mean
, which doesn't conform to this (the returned values can't be used to update the model). Can we rename itmean_1d_profile
?get_1d_profile
on the other hand works just as expected, but it takes coordinates in the order lat, lon, rather than lon, lat like everywhere else in the module. Can this be changed?