Skip to content

Commit

Permalink
Adding a new endpoint for experiment statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
hormiai76 committed Oct 8, 2020
1 parent 8f893fb commit 4282725
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
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';
2 changes: 1 addition & 1 deletion ispyb-ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@
<ispyb.authentication.method>LDAP</ispyb.authentication.method>
<ispyb.authorisation.proposals.source>database</ispyb.authorisation.proposals.source>

<ldap.employee.resource>ldaps://srv-ad-2.maxiv.lu.se/</ldap.employee.resource>
<ldap.employee.resource>ldaps://adauth.maxiv.lu.se/</ldap.employee.resource>
<ldap.base>dc=maxlab,dc=lu,dc=se</ldap.base>
<ldap.people>dc=maxlab,dc=lu,dc=se</ldap.people>
<ldap.attribute>samaccountname</ldap.attribute>
Expand Down

0 comments on commit 4282725

Please sign in to comment.