-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Is your feature request related to a problem? Please describe.
When calling get_permeability_data as shown below, it is possible to pass temperature and frequency values that are outside of the range of the source data, like temperature=-20, frequency=1e12 and get results back without triggering a warning.
import materialdatabase as mdb
db = mdb.MaterialDatabase()
db.get_permeability_data(
temperature=25,
frequency=1e5,
material_name=mdb.Material._3F4,
datatype=mdb.MeasurementDataType.ComplexPermeability,
datasource=mdb.MaterialDataSource.ManufacturerDatasheet)Describe the solution you'd like
- raise a warning ( https://docs.python.org/3/library/warnings.html ) when temperature or frequency are out of range, e.g.
"temperature=-20 is outside of range [25, 100]". Use case: quick visual feedback. - return a tuple of
(values, info_dict)similar to theinfo_dictreturned byscipy.curve_fit( https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html ). whereinfo_dictcontains:- a boolean value indicating whether or not the values were extrapolated, e.g.
{"extrapolated": False}. Use case: annotation in subsequent analyses. - (nice to have) the maximum distance to the nearest neighbor along the temperature and frequency axes, e.g.:
{"furthest_neighbor": (0, 15000)}, indicating that the furthest point away in the interpolation was 0C and 15000 Hz away from the requested point. Use case: proxy for uncertainty.
- a boolean value indicating whether or not the values were extrapolated, e.g.
Metadata
Metadata
Assignees
Labels
No labels