CADET-Match for fitting multiple experiments

Hi, I’m trying to fit a multi-state SMA model to a set of experiments.
The simulation did run when I used only one experiment, but error occurred when multiple experiments were specified.

ValueError                                Traceback (most recent call last)
~/ipykernel_6756/ in <cell line: 8>()
      6     json.dump(match_config.to_dict(), json_file, indent='\t')
----> 8 match = Match(match_config_file)
      9 match.start_sim()

~\AppData\Roaming\Python\Python38\site-packages\CADETMatch\ in __init__(self, json_path)
     17         self.cache.setup_dir(json_path)
     18         CADETMatch.match.createDirectories(self.cache, json_path)
---> 19         self.cache.setup(json_path)
     21     def start_sim(self):

~\AppData\Roaming\Python\Python38\site-packages\CADETMatch\ in setup(self, json_path, load_plugins)
    145         ]
    146         self.setupHeaders()
--> 147         self.setupTarget()
    148         self.setupMinMax()

~\AppData\Roaming\Python\Python38\site-packages\CADETMatch\ in setupTarget(self)
    423         for experiment in self.settings["experiments"]:
---> 86     return ufunc.reduce(obj, axis, dtype, out, **passkwargs)

ValueError: zero-size array to reduction operation maximum which has no identity

The configuration is the same as using single experiment, with adding experiment2 and feature2.

experiment1 = Dict() = 'pH7.5_20CV'
experiment1.csv = '../resources/20CV.csv'
experiment1.HDF5 = 'monomer_20CV_reference.h5'
experiment1.output_path = '/output/solution/unit_002/SOLUTION_OUTLET_COMP_001'

experiment2 = Dict() = 'pH7.5_40CV'
experiment2.csv = '../resources/40CV.csv'
experiment2.HDF5 = 'monomer_40CV_reference.h5'
experiment2.output_path = '/output/solution/unit_002/SOLUTION_OUTLET_COMP_001'

match_config.experiments = [experiment1, experiment2,]

feature1 = Dict() = "Pulse"
feature1.type = 'Shape'

experiment1.features = [feature1,]

feature2 = Dict() = "Pulse"
feature2.type = 'Shape'

experiment2.features = [feature2,]

The reference h5 files for different experiments are already created, so I’m not sure why CADET-match has error when using more than 2 experiments.

Appreciate if you can help.

Let me answer this by myself, there was 0 attached at the end of my experiment data which caused the error.
CADET-Match is working fine after I delete the 0s.


It is great that you figured that out.

1 Like