-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #491 from hormiai76/master
Remote energy + new statistics endpoint + some local fixes
- Loading branch information
Showing
22 changed files
with
528 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
ispyb-ejb/db/scripts/ahead/2020_05_08_EnergyScan_add_remoteEnergy.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2020_05_08_EnergyScan_add_remoteEnergy.sql', 'ONGOING'); | ||
|
||
ALTER TABLE `pydb`.`EnergyScan` | ||
ADD COLUMN `remoteEnergy` FLOAT NULL DEFAULT NULL AFTER `blSubSampleId`, | ||
ADD COLUMN `remoteFPrime` FLOAT NULL DEFAULT NULL AFTER `remoteEnergy`, | ||
ADD COLUMN `remoteFDoublePrime` FLOAT NULL DEFAULT NULL AFTER `remoteFPrime`; | ||
|
||
USE `pydb`; | ||
CREATE | ||
OR REPLACE ALGORITHM = MERGE | ||
DEFINER = `pxadmin`@`%` | ||
SQL SECURITY DEFINER | ||
VIEW `v_energyScan` AS | ||
SELECT | ||
`EnergyScan`.`energyScanId` AS `energyScanId`, | ||
`EnergyScan`.`sessionId` AS `sessionId`, | ||
`EnergyScan`.`blSampleId` AS `blSampleId`, | ||
`EnergyScan`.`fluorescenceDetector` AS `fluorescenceDetector`, | ||
`EnergyScan`.`scanFileFullPath` AS `scanFileFullPath`, | ||
`EnergyScan`.`choochFileFullPath` AS `choochFileFullPath`, | ||
`EnergyScan`.`jpegChoochFileFullPath` AS `jpegChoochFileFullPath`, | ||
`EnergyScan`.`element` AS `element`, | ||
`EnergyScan`.`startEnergy` AS `startEnergy`, | ||
`EnergyScan`.`endEnergy` AS `endEnergy`, | ||
`EnergyScan`.`transmissionFactor` AS `transmissionFactor`, | ||
`EnergyScan`.`exposureTime` AS `exposureTime`, | ||
`EnergyScan`.`synchrotronCurrent` AS `synchrotronCurrent`, | ||
`EnergyScan`.`temperature` AS `temperature`, | ||
`EnergyScan`.`peakEnergy` AS `peakEnergy`, | ||
`EnergyScan`.`peakFPrime` AS `peakFPrime`, | ||
`EnergyScan`.`peakFDoublePrime` AS `peakFDoublePrime`, | ||
`EnergyScan`.`inflectionEnergy` AS `inflectionEnergy`, | ||
`EnergyScan`.`inflectionFPrime` AS `inflectionFPrime`, | ||
`EnergyScan`.`inflectionFDoublePrime` AS `inflectionFDoublePrime`, | ||
`EnergyScan`.`xrayDose` AS `xrayDose`, | ||
`EnergyScan`.`startTime` AS `startTime`, | ||
`EnergyScan`.`endTime` AS `endTime`, | ||
`EnergyScan`.`edgeEnergy` AS `edgeEnergy`, | ||
`EnergyScan`.`filename` AS `filename`, | ||
`EnergyScan`.`beamSizeVertical` AS `beamSizeVertical`, | ||
`EnergyScan`.`beamSizeHorizontal` AS `beamSizeHorizontal`, | ||
`EnergyScan`.`crystalClass` AS `crystalClass`, | ||
`EnergyScan`.`comments` AS `comments`, | ||
`EnergyScan`.`flux` AS `flux`, | ||
`EnergyScan`.`flux_end` AS `flux_end`, | ||
`EnergyScan`.`remoteEnergy` AS `remoteEnergy`, | ||
`EnergyScan`.`remoteFPrime` AS `remoteFPrime`, | ||
`EnergyScan`.`remoteFDoublePrime` AS `remoteFDoublePrime`, | ||
`BLSample`.`blSampleId` AS `BLSample_sampleId`, | ||
`BLSample`.`name` AS `name`, | ||
`BLSample`.`code` AS `code`, | ||
`Protein`.`acronym` AS `acronym`, | ||
`BLSession`.`proposalId` AS `BLSession_proposalId` | ||
FROM | ||
((((`EnergyScan` | ||
LEFT JOIN `BLSample` ON ((`BLSample`.`blSampleId` = `EnergyScan`.`blSampleId`))) | ||
LEFT JOIN `Crystal` ON ((`Crystal`.`crystalId` = `BLSample`.`crystalId`))) | ||
LEFT JOIN `Protein` ON ((`Protein`.`proteinId` = `Crystal`.`proteinId`))) | ||
LEFT JOIN `BLSession` ON ((`BLSession`.`sessionId` = `EnergyScan`.`sessionId`))); | ||
|
||
UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2020_05_08_EnergyScan_add_remoteEnergy.sql'; |
37 changes: 37 additions & 0 deletions
37
ispyb-ejb/db/scripts/ahead/2020_10_08_experiment_statistics_view.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2020_10_08_experiment_statistics_view.sql', 'ONGOING'); | ||
|
||
CREATE | ||
ALGORITHM = UNDEFINED | ||
DEFINER = `pxadmin`@`%` | ||
SQL SECURITY DEFINER | ||
VIEW `v_mx_experiment_stats` AS | ||
SELECT | ||
`DC`.`startTime` AS `startTime`, | ||
`DC`.`numberOfImages` AS `Images`, | ||
`DC`.`transmission` AS `Transmission`, | ||
`DC`.`resolution` AS `Res. (corner)`, | ||
`DC`.`wavelength` AS `En. (Wave.)`, | ||
`DC`.`omegaStart` AS `Omega start (total)`, | ||
`DC`.`exposureTime` AS `Exposure Time`, | ||
`DC`.`flux` AS `Flux`, | ||
`DC`.`flux_end` AS `Flux End`, | ||
`DC`.`detectorDistance` AS `Detector Distance`, | ||
`DC`.`xBeam` AS `X Beam`, | ||
`DC`.`yBeam` AS `Y Beam`, | ||
`DC`.`kappaStart` AS `Kappa`, | ||
`DC`.`phiStart` AS `Phi`, | ||
`DC`.`axisStart` AS `Axis Start`, | ||
`DC`.`axisEnd` AS `Axis End`, | ||
`DC`.`axisRange` AS `Axis Range`, | ||
`DC`.`beamSizeAtSampleX` AS `Beam Size X`, | ||
`DC`.`beamSizeAtSampleY` AS `Beam Size Y`, | ||
`BLS`.`beamLineName` AS `beamLineName`, | ||
`DCG`.`comments` AS `comments`, | ||
`P`.`proposalNumber` AS `proposalNumber` | ||
FROM | ||
(((`DataCollection` `DC` | ||
JOIN `DataCollectionGroup` `DCG` ON ((`DCG`.`dataCollectionGroupId` = `DC`.`dataCollectionGroupId`))) | ||
JOIN `BLSession` `BLS` ON ((`BLS`.`sessionId` = `DCG`.`sessionId`))) | ||
JOIN `Proposal` `P` ON ((`P`.`proposalId` = `BLS`.`proposalId`))) | ||
|
||
UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2020_10_08_experiment_statistics_view.sql'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.