Implentment new function
This commit is contained in:
parent
9854f5a660
commit
85fdcac992
@ -392,11 +392,11 @@ class FitAnalyser():
|
||||
)
|
||||
|
||||
def _fit_1D(self, data, params, x):
|
||||
return self.fitModel.fit(data=data, x=x, params=params)
|
||||
return self.fitModel.fit(data=data, x=x, params=params, nan_policy='omit')
|
||||
|
||||
def _fit_2D(self, data, params, x, y):
|
||||
data = data.flatten(order='F')
|
||||
return self.fitModel.fit(data=data, x=x, y=y, params=params)
|
||||
return self.fitModel.fit(data=data, x=x, y=y, params=params, nan_policy='omit')
|
||||
|
||||
def fit(self, dataArray, paramsArray, x=None, y=None, input_core_dims=None, dask='parallelized', vectorize=True, keep_attrs=True, daskKwargs=None, **kwargs):
|
||||
|
||||
|
@ -113,7 +113,7 @@ def update_hdf5_file():
|
||||
pass
|
||||
|
||||
|
||||
def read_hdf5_file(filePath, group=None, datesetOfGlobal=None, preprocess=None, join="outer", parallel=True, engine="h5netcdf", phony_dims="access", excludeAxis=[], **kwargs):
|
||||
def read_hdf5_file(filePath, group=None, datesetOfGlobal=None, preprocess=None, join="outer", parallel=True, engine="h5netcdf", phony_dims="access", excludeAxis=[], maxFileNum=None, **kwargs):
|
||||
|
||||
filePath = np.sort(np.atleast_1d(filePath))
|
||||
|
||||
@ -129,6 +129,9 @@ def read_hdf5_file(filePath, group=None, datesetOfGlobal=None, preprocess=None,
|
||||
|
||||
for i in range(len(fullFilePath)):
|
||||
fullFilePath[i] = fullFilePath[i].replace("\\", "/")
|
||||
|
||||
if not maxFileNum is None:
|
||||
fullFilePath = fullFilePath[0:int(maxFileNum)]
|
||||
|
||||
kwargs.update(
|
||||
{
|
||||
|
3392
Example.ipynb
3392
Example.ipynb
File diff suppressed because one or more lines are too long
@ -130,4 +130,10 @@ def extract_temperature_from_fit():
|
||||
|
||||
|
||||
def extract_condensate_fraction_from_fit():
|
||||
pass
|
||||
pass
|
||||
|
||||
def swap_xy(dataSet):
|
||||
dataSet = dataSet.rename_dims(dict(x='__x'))
|
||||
dataSet = dataSet.rename_dims(dict(y='x'))
|
||||
dataSet = dataSet.rename_dims(dict(__x='y'))
|
||||
return dataSet
|
Loading…
Reference in New Issue
Block a user