-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config JSON matrices format #272
Comments
This is to do with how import btrack
from btrack import datasets
config_file = btrack.datasets.cell_config()
config = btrack.config.load_config(config_file)
btrack.config.save_config('test_config.json', config) you'll get the same result. Maybe there's a library we can use to format the json nicely, or perhaps it's possible by writing a custom json encoder to pass to pydantic, but I'm not sure. Should we move this issue to the main |
Alternatively, could we store these "matrices" as matrices, i.e. 2D lists? |
we could but there would still be only one element per line not one sub-list per line, so it would be the same looking file just with more square brackets and indentation. We'd still need to write a custom encoder to write it nicely. Plus changing the way the config files are written might break things for a lot of people, unless we support reading both the current format and a new format with 2d lists |
Agreed it would be a drastic change but I personally don't think it is worth the effort if we keep them as 1D lists. |
When I export the configuration into the
json
file using theSave configuration
button, the motion model matrices are not written out in the 2D matrix form, but in number-per-line format (see picture below). Their values are 100% correct, but it's visually difficult to check the matrix for symmetry & see its diagonal values. Could we re-format this?The text was updated successfully, but these errors were encountered: