sciapp / sampledb

Sample and Measurement Metadata Database
https://scientific-it-systems.iffgit.fz-juelich.de/SampleDB/
MIT License
21 stars 11 forks source link

Questions concerning instrument #36

Open ivandga opened 2 years ago

ivandga commented 2 years ago

Hi, I got two questions concerning "instrument" 1) why does every entity automatically have the attribute "instrument"? 2) If I include a sample in an instrument log entry, the sample will not show any information in the "instrument" attribute. Is it ok like this? I would have expected the "instrument" field in the sample mask to show, that I have used that sample with that instrument.

I am testing with the docker container on version 0.20.0

Best regards from DESY@Hamburg, Ivan

FlorianRhiem commented 2 years ago

Hey @ivandga,

instruments are used to map real instruments to the SampleDB actions that can be done with them. When you create an object using an action that was created for a specific instrument, then when viewing the object this instrument will be linked. When you create an object using an action that does not have an associated instrument, then no instrument will be linked on the page for this object.

As such, this relationship is transitive: Object -> Action -> Instrument, and the object itself does not have this attribute "Instrument" at all, it is only displayed as likely useful information about how/where the object was created.

This should then also explain why there is no connection between this displayed Instrument (the Instrument the object was created with) and any entries in any instrument log.

I hope this answered your question, also see the documentation on instruments.