Closed matz-e closed 1 year ago
Everything above looks fine. Please remember that this has to build under linux/mac and windows, since we produce wheels and such for all platforms.
a
get
method to obtain morphologies stored
What would be the argument to the get? A number? A string?
The current solution in morpho-kit is essentially:
class MorphologyStorage {
public:
virtual morphio::Morphology get(const std::string& morph_name) const = 0;
};
class DirectoryStorage {
public:
DirectoryStorage(const std::string& dirname);
morphio::Morphology get(const std::string& morph_name) const override;
public:
const std::string& dirname;
};
class FileStorage {
public:
FileStorage(const std::string& container_name);
morphio::Morphology get(const std::string& morph_name) const override;
public:
HighFive::File file;
};
The assumption is that the file name is {dirname}/{morph_name}.{ext}
where there's some guessing an precedence order for picking the extension.
Everything above looks fine. Please remember that this has to build under linux/mac and windows, since we produce wheels and such for all platforms.
a
get
method to obtain morphologies storedWhat would be the argument to the get? A number? A string?
As @1uc pointed out in the interface snippet, the morphology name as currently stored in SONATA. If we had integration with libsonata
, one could actually use a node id. Not sure that this is desired, though.
Multiple circuits should be able to use the same morphology container. Hence, the node ID alone doesn't identify the morphology; conversely multiple nodes can map to the same morphology.
A while ago we added support for reading morphologies from groups in #163. This has led to experimental work by @1uc to see how well HDF5 files work to store many morphologies in a single file (presentation incoming). I think it would be good to consolidate the work done in our internal MorphoKit in MorphIO by
MorphologyStorage
(or similar) class that takes either a directory or path to an HDF5 file and exposes a.get
method to obtain morphologies stored