trixi-framework / trixi-framework/TrixiParticles.jl
Revise JSON format
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 83
- Forks
- 24
- Avg merge
- 8d 18h
- Merged PRs (30d)
- 3
Description
The current JSON format is
{
"meta": {
"julia_version": "1.10.1",
"solver_version": "c6184f4-dirty",
"solver_name": "TrixiParticles.jl"
},
"mid_point_y_solid_1": {
"n_values": 4,
"time": [
0.0,
0.01,
0.02,
0.03,
],
"system_name": "solid",
"values": [
0.01,
0.009900000027477278,
0.009598224579854263,
0.009120736097874588,
],
"datatype": "Float64",
"type": "series"
},
"mid_point_x_solid_1": {
"n_values": 4,
"time": [
0.0,
0.01,
0.02,
0.03,
],
"system_name": "solid",
"values": [
0.4,
0.39999999975087647,
0.3999997685917326,
0.3999980137707291,
],
"datatype": "Float64",
"type": "series"
}
}
For large files, there are a lot of duplicate time vectors. I suggest we extract the time to only have it once. So I guess as data["time"] or so.
Also, wouldn't it be nicer to do data["fluid_1"]["pressure"]["values"] instead of data["pressure_fluid_1"]["values"]?
Then I suggest the following format (open for discussion):
{
"meta": {
"julia_version": "1.10.1",
"solver_version": "c6184f4-dirty",
"solver_name": "TrixiParticles.jl"
},
"time": {
"n_valus": 4,
"values": [
0.0,
0.01,
0.02,
0.03,
],
"datatype": "Float64",
"type": "series",
},
"solid_1": {
"mid_point_y": {
"n_values": 4,
"values": [
0.01,
0.009900000027477278,
0.009598224579854263,
0.009120736097874588,
],
"datatype": "Float64",
"type": "series",
},
"mid_point_x": {
"n_values": 4,
"values": [
0.4,
0.39999999975087647,
0.3999997685917326,
0.3999980137707291,
],
"datatype": "Float64",
"type": "series"
},
},
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Locate the Julia code that serializes the current JSON output, then confirm the agreed layout and its consumers; done means producing the revised nested format with one shared time vector.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100