diff --git a/api/src/Page/DC.php b/api/src/Page/DC.php index c18d0dacd..ae48a8940 100644 --- a/api/src/Page/DC.php +++ b/api/src/Page/DC.php @@ -62,6 +62,8 @@ class DC extends Page array('/dat/:id', 'get', '_plot'), ); + const EVTOA = 12398.4198; + # ------------------------------------------------------------------------ # Data Collection AJAX Requests # This is pretty crazy, it will return unioned data collections, energy @@ -422,9 +424,12 @@ function _data_collections($single = null) dc.transmission, dc.axisrange, dc.wavelength, + ".self::EVTOA."/dc.wavelength as energy, dc.comments, 1 as epk, 1 as ein, + 1 as wpk, + 1 as win, dc.xtalsnapshotfullpath1 as x1, dc.xtalsnapshotfullpath2 as x2, dc.xtalsnapshotfullpath3 as x3, @@ -556,9 +561,12 @@ function _data_collections($single = null) min(dc.transmission) as transmission, min(dc.axisrange) as axisrange, min(dc.wavelength) as wavelength, + ".self::EVTOA."/min(dc.wavelength) as energy, min(dc.comments) as comments, 1 as epk, 1 as ein, + 1 as wpk, + 1 as win, min(dc.xtalsnapshotfullpath1) as x1, min(dc.xtalsnapshotfullpath2) as x2, min(dc.xtalsnapshotfullpath3) as x3, @@ -705,17 +713,20 @@ function _data_collections($single = null) es.energyscanid, 1, es.element, - es.peakfprime, + es.peakfprime as resolution, es.exposuretime, es.axisposition, - es.peakfdoubleprime, + es.peakfdoubleprime as numimg, es.starttime as st, es.transmissionfactor, - es.inflectionfprime, - es.inflectionfdoubleprime, + es.inflectionfprime as axisrange, + es.inflectionfdoubleprime as wavelength, + 1 as energy, es.comments, es.peakenergy, es.inflectionenergy, + ".self::EVTOA."/es.peakenergy as wpk, + ".self::EVTOA."/es.inflectionenergy as win, 'A', 'A', 'A', @@ -805,10 +816,13 @@ function _data_collections($single = null) TO_CHAR(xrf.starttime, 'DD-MM-YYYY HH24:MI:SS') as st, xrf.beamtransmission, 1, - xrf.energy, + ".self::EVTOA."/xrf.energy as wavelength, + xrf.energy as energy, xrf.comments, 1, 1, + 1 as wpk, + 1 as win, 'A', 'A', 'A', @@ -899,9 +913,12 @@ function _data_collections($single = null) 1, 1, 1, + 1 as energy, 'A', 1, 1, + 1 as wpk, + 1 as win, r.xtalsnapshotbefore, r.xtalsnapshotafter, 'A', @@ -974,7 +991,7 @@ function _data_collections($single = null) // Data collections if ($dc['TYPE'] == 'data') { - $nf = array(1 => array('AXISSTART', 'CHISTART', 'PHI', 'OVERLAP'), 2 => array('RESOLUTION', 'TRANSMISSION', 'AXISRANGE', 'TOTALDOSE'), 4 => array('WAVELENGTH', 'EXPOSURETIME')); + $nf = array(0 => array('ENERGY'), 1 => array('AXISSTART', 'CHISTART', 'PHI', 'OVERLAP'), 2 => array('RESOLUTION', 'TRANSMISSION', 'AXISRANGE', 'TOTALDOSE'), 4 => array('WAVELENGTH', 'EXPOSURETIME')); $dc['DIRFULL'] = $dc['DIR']; $dc['DIR'] = preg_replace('/.*\/' . $this->arg('prop') . '-' . $dc['VN'] . '\//', '', $dc['DIR']); @@ -1010,12 +1027,12 @@ function _data_collections($single = null) $dc['FILETEMPLATE'] = preg_replace('/.*\/' . $this->arg('prop') . '-' . $dc['VN'] . '\//', '', $dc['FILETEMPLATE']); - $nf = array(2 => array('EXPOSURETIME', 'AXISSTART', 'RESOLUTION', 'TRANSMISSION')); + $nf = array(1 => array('EPK', 'EIN'), 2 => array('AXISRANGE', 'WAVELENGTH', 'EXPOSURETIME', 'AXISSTART', 'RESOLUTION', 'TRANSMISSION', 'NUMIMG'), 5 => array('WPK', 'WIN')); $this->profile('edge'); // MCA Scans } else if ($dc['TYPE'] == 'mca') { - $nf = array(2 => array('EXPOSURETIME', 'WAVELENGTH', 'TRANSMISSION')); + $nf = array(0 => array('ENERGY'), 2 => array('EXPOSURETIME', 'TRANSMISSION'), 4 => array('WAVELENGTH')); $dc['DIRFULL'] = $dc['DIR']; $dc['DIR'] = preg_replace('/.*\/\d\d\d\d\/\w\w\d+-\d+\//', '', $dc['DIR']); diff --git a/client/src/js/templates/dc/dc.html b/client/src/js/templates/dc/dc.html index 4237f4515..b23bb657a 100644 --- a/client/src/js/templates/dc/dc.html +++ b/client/src/js/templates/dc/dc.html @@ -24,7 +24,7 @@
<% if (SI != 1 ) { %>