Automatically add labels if they're contained in .json files
Hello there,
Based on our discussion today on the meeting, I opened this issue (hopefully it doesn't make any problem because it was in your TODO, otherwise just delete it) and I'll try to work on it on these 4 days coming that I'll have more free time! 😄
All the best,
Andreas Pappas
Hi Andreas, thanks for doing this! An example of a file with labels is: https://github.com/HSF/phoenix/pull/251/commits/8e6ffcb23c424d0e702a2c9eb0595be9fe33a20d
Hello, can I work on this issue
Yes, you can (in general you are free to work on any issue which hasn't been assigned to someone)
Ok will do thank you
Hello, are the json files being changed during runtime?
No, these will not change during runtime.
I have added the labels as eta/phi for all objects in the atlas.json file but for the tracks, I'm a bit confused on how to go about the labelling can you help me with that
Hi @EdwardMoyse can I get an update on this?
Hi @Pratz2005 - sorry, I have been offline. Can you point me to your code?
Basically I would think you would follow the logic in private loadLabelsFile() {
So how I understood the problem was that in the json files there are no labels so I just wrote a python script to parse through the atlas.json file to add labels as eta/phi for all objects which have eta and phi as variables as shown in the example.
Aaah! No, sorry - that's not it. I don't care about what the actual content of the labels is - they are just placeholders.
What we want to do is to streamline adding labels to objects i.e. instead of this taking two steps:
- loading an event data file (e.g.
atlas.json, but it should work for all formats), - and then loading a
labels.jsonfile.
It should be one step: open the event data file, and then if the event data objects have a label attribute the we would automatically call this.three.addLabelToObject to put the labels into the 3D view.
Hi @EdwardMoyse can you assist me on how to test the issue on the UI. Do you want me to add labels into the view when i import the ATLAS_calibration.json file?
@EdwardMoyse Can I get an update on this