Open KarlLevik opened 7 years ago
@KarlLevik
For us, in the BeamLineSetup table has sense.
Cheers, A.
We would like to propose the following:
ALTER TABLE BeamLineSetup
ADD detectorId int(11) AFTER beamLineSetupId,
ADD beamSizeXMin float COMMENT 'unit: um',
ADD beamSizeXMax float COMMENT 'unit: um',
ADD beamSizeYMin float COMMENT 'unit: um',
ADD beamSizeYMax float COMMENT 'unit: um',
ADD energyMin float COMMENT 'unit: eV',
ADD energyMax float COMMENT 'unit: eV',
ADD omegaMin float COMMENT 'unit: degrees',
ADD omegaMax float COMMENT 'unit: degrees',
ADD kappaMin float COMMENT 'unit: degrees',
ADD kappaMax float COMMENT 'unit: degrees',
ADD phiMin float COMMENT 'unit: degrees',
ADD phiMax float COMMENT 'unit: degrees',
ADD goniostatMaxOscillationWidth double COMMENT 'unit: degrees' AFTER goniostatMaxOscillationSpeed,
ADD maxExposureTimePerImage float COMMENT 'unit: seconds' AFTER maxExpTimePerDataCollection,
ADD maxTransmission double COMMENT 'unit: percentage' AFTER goniostatMinOscillationWidth,
ADD active boolean NOT NULL DEFAULT 0 COMMENT 'Whether the BeamLineSetup is active (1) or not (0)',
ADD numberOfImagesMax mediumint unsigned,
ADD numberOfImagesMin mediumint unsigned,
ADD boxSizeXMin double COMMENT 'For gridscans, unit: um',
ADD boxSizeXMax double COMMENT 'For gridscans, unit: um',
ADD boxSizeYMin double COMMENT 'For gridscans, unit: um',
ADD boxSizeYMax double COMMENT 'For gridscans, unit: um',
ADD CONSTRAINT BeamLineSetup_ibfk_1 FOREIGN KEY (detectorId) REFERENCES Detector(detectorId) ON DELETE RESTRICT ON UPDATE RESTRICT;
As you can see, we link the BeamLineSetup
table to the Detector
table with a foreign key, as we think the BeamLineSetup parameters are often valid for a particular Detector.
@StephMonaco: Do you think is anything missing?
I think this is a good suggestion that will complement already min max values in this table. I wonder if we shouldn't take this opportunity to add a list of aperture sizes that are beamline dependant (like 10, 20 30 microns..)
We have to look if we can use the aperture table and link the BeamlineSetUp table to the Aperture table for the aperture sizes. It's ok for us for the other changes.
The aperture table exists and contains : apertureId, sizeX How will we link it to BeamlineSetup Table ? 1 to 1 ? Many to 1 ?
Re: apertures, we have a foreign key column in DataCollection
(apertureId
). I think this is wrong - what's the point of a table with only one column (sizeX
) that is in a 1:1 relationship with DataCollecton
?
We should simply move the sizeX
column into DataCollection
, and rename the column to apertureSizeX
.
We have a requirement at Diamond to be able to specify that certain parameter values are restricted to certain ranges (so we need min and max values) for each beamline. These ranges can change over time. So far we have identified the following:
detector distance beam size wavelength omega kappa phi exposure time
For detector distance, we have min and max values in the Detector table. For the others, I'm not sure anything exists yet? Would the right place for these be the BeamLineSetup table?