diff --git a/api/src/Page/DC.php b/api/src/Page/DC.php index 8fe812ff4..03c8e45f6 100644 --- a/api/src/Page/DC.php +++ b/api/src/Page/DC.php @@ -976,7 +976,7 @@ function _data_collections($single = null) // Data collections if ($dc['TYPE'] == 'data') { - $nf = array(1 => array('AXISSTART'), 2 => array('RESOLUTION', 'TRANSMISSION', 'AXISRANGE'), 4 => array('WAVELENGTH', 'EXPOSURETIME')); + $nf = array(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']); diff --git a/api/src/Page/Sample.php b/api/src/Page/Sample.php index 1b0798a24..eb625fade 100644 --- a/api/src/Page/Sample.php +++ b/api/src/Page/Sample.php @@ -122,6 +122,7 @@ class Sample extends Page 'UNQUEUE' => '\d', 'nodata' => '\d', 'notcompleted' => '\d', + 'filter' => '\w+', // external is a flag to indicate this protein/sample has a user office system id // whereas externalid is the actual reference @@ -594,6 +595,17 @@ function _queue_all_sub_samples() $args = array($this->proposalid, $this->arg('cid'), $this->arg('cid'), $this->arg('cid')); $where = ' AND c.containerid=:2 AND cq2.completedtimestamp IS NULL'; + + if ($this->has_arg('filter')) { + $filters = array( + 'manual' => " AND ss.source='manual'", + 'auto' => " AND ss.source='auto'", + 'point' => " AND dp.experimentkind='SAD'", + 'region' => " AND dp.experimentkind='MESH'", + ); + $where .= $filters[$this->arg('filter')]; + } + $first_inner_select_where = ' AND s.containerid=:3'; $second_inner_select_where = ' AND s.containerid=:4'; @@ -1715,12 +1727,24 @@ function _proteins() // Only display original UAS approved proteins (not clones which have the same externalId) if ($this->has_arg('original') && $this->arg('original') == 1) { - $group = 'pr.externalId'; - $order .= ', pr.bltimeStamp DESC'; + $where .= ' AND pr.proteintype = "ORIGIN:UAS"'; } if ($this->has_arg('sort_by')) { - $cols = array('NAME' => 'pr.name', 'ACRONYM' => 'pr.acronym', 'MOLECULARMASS' => 'pr.molecularmass', 'HASSEQ' => "CASE WHEN sequence IS NULL THEN 'No' ELSE 'Yes' END"); + $cols = array( + 'NAME' => 'pr.name', + 'ACRONYM' => 'pr.acronym', + 'MOLECULARMASS' => 'pr.molecularmass', + 'DENSITY' => 'pr.density', + 'SEQUENCE' => 'pr.sequence', + 'SAFETYLEVEL' => 'pr.safetylevel', + 'HASSEQ' => "CASE WHEN sequence IS NULL THEN 'No' ELSE 'Yes' END", + 'PDBS' => 'pdbs', + 'CONCENTRATIONTYPE' => 'concentrationtype', + 'COMPONENTTYPE' => 'componenttype', + 'DCOUNT' => 'dcount', + 'SCOUNT' => 'scount' + ); $dir = $this->has_arg('order') ? ($this->arg('order') == 'asc' ? 'ASC' : 'DESC') : 'ASC'; if (array_key_exists($this->arg('sort_by'), $cols)) $order = $cols[$this->arg('sort_by')] . ' ' . $dir; @@ -1736,56 +1760,23 @@ function _proteins() HEX(pr.externalid) as externalid, pr.density, count(php.proteinid) as pdbs, - pr.safetylevel + pr.safetylevel, + count(dc.datacollectionid) as dcount, + count(b.blsampleid) as scount FROM protein pr LEFT OUTER JOIN concentrationtype ct ON ct.concentrationtypeid = pr.concentrationtypeid LEFT OUTER JOIN componenttype cmt ON cmt.componenttypeid = pr.componenttypeid LEFT OUTER JOIN protein_has_pdb php ON php.proteinid = pr.proteinid - /*LEFT OUTER JOIN crystal cr ON cr.proteinid = pr.proteinid + LEFT OUTER JOIN crystal cr ON cr.proteinid = pr.proteinid LEFT OUTER JOIN blsample b ON b.crystalid = cr.crystalid - LEFT OUTER JOIN datacollection dc ON b.blsampleid = dc.blsampleid*/ + LEFT OUTER JOIN datacollection dc ON b.blsampleid = dc.blsampleid INNER JOIN proposal p ON p.proposalid = pr.proposalid $join WHERE $where GROUP BY $group ORDER BY $order", $args); - $ids = array(); - $wcs = array(); - foreach ($rows as $r) { - array_push($ids, $r['PROTEINID']); - array_push($wcs, 'pr.proteinid=:' . sizeof($ids)); - } - - $dcs = array(); - $scs = array(); - - if (sizeof($ids)) { - $dcst = $this->db->pq('SELECT pr.proteinid, count(dc.datacollectionid) as dcount FROM datacollection dc INNER JOIN blsample s ON s.blsampleid=dc.blsampleid INNER JOIN crystal cr ON cr.crystalid = s.crystalid INNER JOIN protein pr ON pr.proteinid = cr.proteinid WHERE ' . implode(' OR ', $wcs) . ' GROUP BY pr.proteinid', $ids); - - - foreach ($dcst as $d) { - $dcs[$d['PROTEINID']] = $d['DCOUNT']; - } - - $scst = $this->db->pq('SELECT pr.proteinid, count(s.blsampleid) as scount FROM blsample s INNER JOIN crystal cr ON cr.crystalid = s.crystalid INNER JOIN protein pr ON pr.proteinid = cr.proteinid WHERE ' . implode(' OR ', $wcs) . ' GROUP BY pr.proteinid', $ids); - - foreach ($scst as $d) { - $scs[$d['PROTEINID']] = $d['SCOUNT']; - } - } - - foreach ($rows as &$r) { - $dcount = array_key_exists($r['PROTEINID'], $dcs) ? $dcs[$r['PROTEINID']] : 0; - $r['DCOUNT'] = $dcount; - $scount = array_key_exists($r['PROTEINID'], $scs) ? $scs[$r['PROTEINID']] : 0; - $r['SCOUNT'] = $scount; - - if ($this->has_arg('pid')) - $r['SEQUENCE'] = $this->db->read($r['SEQUENCE']); - } - if ($this->has_arg('pid')) { if (sizeof($rows)) $this->_output($rows[0]); diff --git a/api/src/Page/Shipment.php b/api/src/Page/Shipment.php index 88d45adc0..7ddcdf1b6 100644 --- a/api/src/Page/Shipment.php +++ b/api/src/Page/Shipment.php @@ -729,8 +729,7 @@ function _add_prop_dewar() $this->_error('No dewar specified'); if (!$this->has_arg('PROPOSALID')) $this->_error('No proposal specified'); - if (!$this->has_arg('LABCONTACTID')) - $this->_error('No lab contact specified'); + $lc = $this->has_arg('LABCONTACTID') ? $this->arg('LABCONTACTID') : null; $chk = $this->db->pq("SELECT dewarregistryid FROM dewarregistry_has_proposal @@ -739,7 +738,7 @@ function _add_prop_dewar() $this->_error('That dewar is already registered to that proposal'); $this->db->pq("INSERT INTO dewarregistry_has_proposal (dewarregistryid,proposalid,personid,labcontactid) - VALUES (:1,:2,:3,:4)", array($this->arg('DEWARREGISTRYID'), $this->arg('PROPOSALID'), $this->user->personId, $this->arg('LABCONTACTID'))); + VALUES (:1,:2,:3,:4)", array($this->arg('DEWARREGISTRYID'), $this->arg('PROPOSALID'), $this->user->personId, $lc)); $this->_output(array('DEWARREGISTRYHASPROPOSALID' => $this->db->id())); } diff --git a/api/tables/energies.json b/api/tables/energies.json index 3dc08e41b..f7dd98292 100644 --- a/api/tables/energies.json +++ b/api/tables/energies.json @@ -1 +1,724 @@ -{"Ba-L": ["4.46626", "4.82753", "5.5311"], "Cu-L": ["0.9297", "0.9498"], "Cu-K": ["8.04778", "8.90529"], "Ba-K": ["32.1936", "36.3782"], "Cl-K": ["2.62239", "2.8156"], "Ne-K": ["0.8486"], "Po-L": ["11.1308", "13.447", "15.744"], "Cr-K": ["5.41472", "5.94671"], "Cr-L": ["0.5728", "0.5828"], "Rn-K": ["83.78", "94.87"], "Np-L": ["13.9441", "17.7502", "20.7848"], "C-K": ["0.277"], "Np-K": ["-", "-"], "Rn-L": ["11.7270", "14.316", "16.770"], "Na-K": ["1.04098", "1.0711"], "Ra-L": ["12.3397", "15.2358", "17.849"], "Ce-L": ["4.8402", "5.2622", "6.052"], "Ce-K": ["34.7197", "39.2573"], "Ra-K": ["88.47", "100.13"], "Po-K": ["79.290", "89.80"], "Be-K": ["0.1085"], "Lu-L": ["7.6555", "8.7090", "10.1434"], "O-K": ["0.5249"], "B-K": ["0.1833"], "Tm-L": ["7.1799", "8.101", "9.426"], "Tm-K": ["50.7416", "57.517"], "Tc-L": ["2.4240", "2.5368", "-"], "In-K": ["24.2097", "27.2759"], "In-L": ["3.28694", "3.48721", "3.92081"], "Tc-K": ["18.3671", "20.619"], "Pm-K": ["38.7247", "43.826"], "Pd-L": ["2.83861", "2.99022", "3.3287"], "Pm-L": ["5.4325", "5.961", "6.892"], "Sb-L": ["3.60472", "3.84357", "4.34779"], "Pt-L": ["9.4423", "11.0707", "12.9420"], "K-K": ["3.3138", "3.5896"], "La-L": ["4.65097", "5.0421", "5.7885"], "Fr-K": ["86.10", "97.47"], "S-K": ["2.30784", "2.46404"], "F-K": ["0.6768"], "La-K": ["33.4418", "37.8010"], "U-L": ["13.6147", "17.2200", "20.1671"], "U-K": ["98.439", "111.300"], "Er-K": ["49.1277", "55.681"], "V-L": ["0.5113", "0.5192"], "V-K": ["4.95220", "5.42729"], "Er-L": ["6.9487", "7.8109", "9.089"], "Pt-K": ["66.832", "75.748"], "Yb-L": ["7.4156", "8.4018", "9.7801"], "Yb-K": ["52.3889", "59.37"], "Nb-K": ["16.6151", "18.6225"], "Nb-L": ["2.16589", "2.2574", "2.4618"], "Si-K": ["1.73998", "1.83594"], "Fr-L": ["12.0313", "14.770", "17.303"], "Lu-K": ["54.0698", "61.283"], "Zn-K": ["8.63886", "9.5720"], "Al-K": ["1.48670", "1.55745"], "Te-L": ["3.76933", "4.02958", "4.5709"], "Th-L": ["12.9687", "16.2022", "18.9825"], "Th-K": ["93.350", "105.609"], "Te-K": ["27.4723", "30.9957"], "Ar-K": ["2.95770", "3.1905"], "Eu-L": ["5.8457", "6.4564", "7.4803"], "Eu-K": ["41.5422", "47.0379"], "Mg-K": ["1.25360", "1.3022"], "Hf-K": ["55.7902", "63.234"], "Hf-L": ["7.8990", "9.0227", "10.5158"], "Mo-K": ["17.47934", "19.6083"], "Co-K": ["6.93032", "7.64943"], "Co-L": ["0.7762", "0.7914"], "Mo-L": ["2.29316", "2.39481", "2.6235"], "Sc-L": ["0.3954", "0.3996"], "Ni-K": ["7.47815", "8.26466"], "Ni-L": ["0.8515", "0.8688"], "Sc-K": ["4.0906", "4.4605"], "I-K": ["28.6120", "32.2947"], "Sr-K": ["14.1650", "15.8357"], "Sr-L": ["1.80656", "1.87172"], "I-L": ["3.93765", "4.22072", "4.8009"], "Y-L": ["1.92256", "1.99584"], "Gd-L": ["6.0572", "6.7132", "7.7858"], "Kr-K": ["12.649", "14.112"], "Kr-L": ["1.5860", "1.6366"], "Zn-L": ["1.0117", "1.0347"], "Sm-L": ["5.6361", "6.2051", "7.178"], "Sm-K": ["40.1181", "45.413"], "Pr-L": ["5.0337", "5.4889", "6.3221"], "At-K": ["81.52", "92.30"], "Pr-K": ["36.0263", "40.7482"], "Ho-L": ["6.7198", "7.5253", "8.747"], "Ho-K": ["47.5467", "53.877"], "Nd-K": ["37.3610", "42.2713"], "Br-L": ["1.48043", "1.52590"], "Br-K": ["11.9242", "13.2914"], "Nd-L": ["5.2304", "5.7216", "6.6021"], "Xe-K": ["29.779", "33.624"], "Ca-K": ["3.69168", "4.0127"], "Cd-K": ["23.1736", "26.0955"], "Re-K": ["61.1403", "69.310"], "Re-L": ["8.6525", "10.0100", "11.6854"], "Cd-L": ["3.13373", "3.31657", "3.71686"], "Ca-L": ["0.3413", "0.3449"], "Hg-L": ["9.9888", "11.8226", "13.8301"], "Rb-L": ["1.69413", "1.75217"], "Rb-K": ["13.3953", "14.9613"], "Hg-K": ["70.819", "80.253"], "Cs-L": ["4.2865", "4.6198", "5.2804"], "Xe-L": ["4.1099", "-", "-"], "Cs-K": ["30.9728", "34.9869"], "Ir-L": ["9.1751", "10.7083", "12.5126"], "Ir-K": ["64.8956", "73.5608"], "Pa-L": ["13.2907", "16.702", "19.568"], "Pa-K": ["95.868", "108.427"], "Tl-K": ["72.8715", "82.576"], "Pb-L": ["10.5515", "12.6137", "14.7644"], "Pb-K": ["74.9694", "84.936"], "Tl-L": ["10.2685", "12.2133", "14.2915"], "Ta-K": ["57.532", "65.223"], "Ta-L": ["8.1461", "9.3431", "10.8952"], "Bi-L": ["10.8388", "13.0235", "15.2477"], "Pu-K": ["-", "-"], "Tb-K": ["44.4816", "50.382"], "Tb-L": ["6.2728", "6.978", "8.102"], "Pu-L": ["14.2786", "18.2937", "21.4173"], "Bi-K": ["77.1079", "87.343"], "W-K": ["59.31824", "67.2443"], "intensities": {"K": ["50", "20", "90"], "L": ["10", "50", "5", "5"]}, "W-L": ["8.3976", "9.67235", "11.2859"], "As-K": ["10.54372", "11.7262"], "Y-K": ["14.9584", "16.7378"], "Mn-L": ["0.6374", "0.6488"], "As-L": ["1.2820", "1.3170"], "Zr-L": ["2.04236", "2.1244", "2.3027"], "Zr-K": ["15.7751", "17.6678"], "Ag-L": ["2.98431", "3.15094", "3.51959"], "Ag-K": ["22.16292", "24.9424"], "Mn-K": ["5.89875", "6.49045"], "Fe-L": ["0.7050", "0.7185"], "Li-K": ["0.0543"], "Fe-K": ["6.40384", "7.05798"], "Dy-K": ["45.9984", "52.119"], "Dy-L": ["6.4952", "7.2477", "8.4188"], "P-K": ["2.0137", "2.1391"], "Se-L": ["1.37910", "1.41923"], "Se-K": ["11.2224", "12.4959"], "Ac-K": ["90.884", "102.85"], "Os-K": ["63.0005", "71.413"], "Os-L": ["8.9117", "10.3553", "12.0953"], "Ac-L": ["12.6520", "15.713", "18.408"], "Ti-K": ["4.51084", "4.93181"], "Am-K": ["-", "-"], "Sb-K": ["26.3591", "29.7256"], "Pd-K": ["21.1771", "23.8187"], "Am-L": ["14.6172", "18.8520", "22.0652"], "Ti-L": ["0.4522", "0.4584"], "Gd-K": ["42.9962", "48.697"], "At-L": ["11.4268", "13.876", "16.251"], "Ga-L": ["1.09792", "1.1248"], "Ga-K": ["9.25174", "10.2642"], "N-K": ["0.3924"], "Au-K": ["68.8037", "77.984"], "Ru-K": ["19.2792", "21.6568"], "Ru-L": ["2.55855", "2.68323", "2.9645"], "Au-L": ["9.7133", "11.4423", "13.3817"], "Rh-K": ["20.2161", "22.7236"], "Rh-L": ["2.69674", "2.83441", "3.1438"], "Sn-L": ["3.44398", "3.66280", "4.13112"], "Sn-K": ["25.2713", "28.4860"], "Ge-K": ["9.88642", "10.9821"], "Ge-L": ["1.18800", "1.2185"]} \ No newline at end of file +{ + "Ac-K": [ + "90.884", + "102.85" + ], + "Ac-L": [ + "12.6520", + "15.713", + "18.408" + ], + "Ag-K": [ + "22.16292", + "24.9424" + ], + "Ag-L": [ + "2.98431", + "3.15094", + "3.51959" + ], + "Al-K": [ + "1.48670", + "1.55745" + ], + "Am-L": [ + "14.6172", + "18.8520", + "22.0652" + ], + "Ar-K": [ + "2.95770", + "3.1905" + ], + "As-K": [ + "10.54372", + "11.7262" + ], + "As-L": [ + "1.2820", + "1.3170" + ], + "At-K": [ + "81.52", + "92.30" + ], + "At-L": [ + "11.4268", + "13.876", + "16.251" + ], + "Au-K": [ + "68.8037", + "77.984" + ], + "Au-L": [ + "9.7133", + "11.4423", + "13.3817" + ], + "B-K": [ + "0.1833" + ], + "Ba-K": [ + "32.1936", + "36.3782" + ], + "Ba-L": [ + "4.46626", + "4.82753", + "5.5311" + ], + "Be-K": [ + "0.1085" + ], + "Bi-K": [ + "77.1079", + "87.343" + ], + "Bi-L": [ + "10.8388", + "13.0235", + "15.2477" + ], + "Br-K": [ + "11.9242", + "13.2914" + ], + "Br-L": [ + "1.48043", + "1.52590" + ], + "C-K": [ + "0.277" + ], + "Ca-K": [ + "3.69168", + "4.0127" + ], + "Ca-L": [ + "0.3413", + "0.3449" + ], + "Cd-K": [ + "23.1736", + "26.0955" + ], + "Cd-L": [ + "3.13373", + "3.31657", + "3.71686" + ], + "Ce-K": [ + "34.7197", + "39.2573" + ], + "Ce-L": [ + "4.8402", + "5.2622", + "6.052" + ], + "Cl-K": [ + "2.62239", + "2.8156" + ], + "Co-K": [ + "6.93032", + "7.64943" + ], + "Co-L": [ + "0.7762", + "0.7914" + ], + "Cr-K": [ + "5.41472", + "5.94671" + ], + "Cr-L": [ + "0.5728", + "0.5828" + ], + "Cs-K": [ + "30.9728", + "34.9869" + ], + "Cs-L": [ + "4.2865", + "4.6198", + "5.2804" + ], + "Cu-K": [ + "8.04778", + "8.90529" + ], + "Cu-L": [ + "0.9297", + "0.9498" + ], + "Dy-K": [ + "45.9984", + "52.119" + ], + "Dy-L": [ + "6.4952", + "7.2477", + "8.4188" + ], + "Er-K": [ + "49.1277", + "55.681" + ], + "Er-L": [ + "6.9487", + "7.8109", + "9.089" + ], + "Eu-K": [ + "41.5422", + "47.0379" + ], + "Eu-L": [ + "5.8457", + "6.4564", + "7.4803" + ], + "F-K": [ + "0.6768" + ], + "Fe-K": [ + "6.40384", + "7.05798" + ], + "Fe-L": [ + "0.7050", + "0.7185" + ], + "Fr-K": [ + "86.10", + "97.47" + ], + "Fr-L": [ + "12.0313", + "14.770", + "17.303" + ], + "Ga-K": [ + "9.25174", + "10.2642" + ], + "Ga-L": [ + "1.09792", + "1.1248" + ], + "Gd-K": [ + "42.9962", + "48.697" + ], + "Gd-L": [ + "6.0572", + "6.7132", + "7.7858" + ], + "Ge-K": [ + "9.88642", + "10.9821" + ], + "Ge-L": [ + "1.18800", + "1.2185" + ], + "Hf-K": [ + "55.7902", + "63.234" + ], + "Hf-L": [ + "7.8990", + "9.0227", + "10.5158" + ], + "Hg-K": [ + "70.819", + "80.253" + ], + "Hg-L": [ + "9.9888", + "11.8226", + "13.8301" + ], + "Ho-K": [ + "47.5467", + "53.877" + ], + "Ho-L": [ + "6.7198", + "7.5253", + "8.747" + ], + "I-K": [ + "28.6120", + "32.2947" + ], + "I-L": [ + "3.93765", + "4.22072", + "4.8009" + ], + "In-K": [ + "24.2097", + "27.2759" + ], + "In-L": [ + "3.28694", + "3.48721", + "3.92081" + ], + "Ir-K": [ + "64.8956", + "73.5608" + ], + "Ir-L": [ + "9.1751", + "10.7083", + "12.5126" + ], + "K-K": [ + "3.3138", + "3.5896" + ], + "Kr-K": [ + "12.649", + "14.112" + ], + "Kr-L": [ + "1.5860", + "1.6366" + ], + "La-K": [ + "33.4418", + "37.8010" + ], + "La-L": [ + "4.65097", + "5.0421", + "5.7885" + ], + "Li-K": [ + "0.0543" + ], + "Lu-K": [ + "54.0698", + "61.283" + ], + "Lu-L": [ + "7.6555", + "8.7090", + "10.1434" + ], + "Mg-K": [ + "1.25360", + "1.3022" + ], + "Mn-K": [ + "5.89875", + "6.49045" + ], + "Mn-L": [ + "0.6374", + "0.6488" + ], + "Mo-K": [ + "17.47934", + "19.6083" + ], + "Mo-L": [ + "2.29316", + "2.39481", + "2.6235" + ], + "N-K": [ + "0.3924" + ], + "Na-K": [ + "1.04098", + "1.0711" + ], + "Nb-K": [ + "16.6151", + "18.6225" + ], + "Nb-L": [ + "2.16589", + "2.2574", + "2.4618" + ], + "Nd-K": [ + "37.3610", + "42.2713" + ], + "Nd-L": [ + "5.2304", + "5.7216", + "6.6021" + ], + "Ne-K": [ + "0.8486" + ], + "Ni-K": [ + "7.47815", + "8.26466" + ], + "Ni-L": [ + "0.8515", + "0.8688" + ], + "Np-L": [ + "13.9441", + "17.7502", + "20.7848" + ], + "O-K": [ + "0.5249" + ], + "Os-K": [ + "63.0005", + "71.413" + ], + "Os-L": [ + "8.9117", + "10.3553", + "12.0953" + ], + "P-K": [ + "2.0137", + "2.1391" + ], + "Pa-K": [ + "95.868", + "108.427" + ], + "Pa-L": [ + "13.2907", + "16.702", + "19.568" + ], + "Pb-K": [ + "74.9694", + "84.936" + ], + "Pb-L": [ + "10.5515", + "12.6137", + "14.7644" + ], + "Pd-K": [ + "21.1771", + "23.8187" + ], + "Pd-L": [ + "2.83861", + "2.99022", + "3.3287" + ], + "Pm-K": [ + "38.7247", + "43.826" + ], + "Pm-L": [ + "5.4325", + "5.961", + "6.892" + ], + "Po-K": [ + "79.290", + "89.80" + ], + "Po-L": [ + "11.1308", + "13.447", + "15.744" + ], + "Pr-K": [ + "36.0263", + "40.7482" + ], + "Pr-L": [ + "5.0337", + "5.4889", + "6.3221" + ], + "Pt-K": [ + "66.832", + "75.748" + ], + "Pt-L": [ + "9.4423", + "11.0707", + "12.9420" + ], + "Pu-L": [ + "14.2786", + "18.2937", + "21.4173" + ], + "Ra-K": [ + "88.47", + "100.13" + ], + "Ra-L": [ + "12.3397", + "15.2358", + "17.849" + ], + "Rb-K": [ + "13.3953", + "14.9613" + ], + "Rb-L": [ + "1.69413", + "1.75217" + ], + "Re-K": [ + "61.1403", + "69.310" + ], + "Re-L": [ + "8.6525", + "10.0100", + "11.6854" + ], + "Rh-K": [ + "20.2161", + "22.7236" + ], + "Rh-L": [ + "2.69674", + "2.83441", + "3.1438" + ], + "Rn-K": [ + "83.78", + "94.87" + ], + "Rn-L": [ + "11.7270", + "14.316", + "16.770" + ], + "Ru-K": [ + "19.2792", + "21.6568" + ], + "Ru-L": [ + "2.55855", + "2.68323", + "2.9645" + ], + "S-K": [ + "2.30784", + "2.46404" + ], + "Sb-K": [ + "26.3591", + "29.7256" + ], + "Sb-L": [ + "3.60472", + "3.84357", + "4.34779" + ], + "Sc-K": [ + "4.0906", + "4.4605" + ], + "Sc-L": [ + "0.3954", + "0.3996" + ], + "Se-K": [ + "11.2224", + "12.4959" + ], + "Se-L": [ + "1.37910", + "1.41923" + ], + "Si-K": [ + "1.73998", + "1.83594" + ], + "Sm-K": [ + "40.1181", + "45.413" + ], + "Sm-L": [ + "5.6361", + "6.2051", + "7.178" + ], + "Sn-K": [ + "25.2713", + "28.4860" + ], + "Sn-L": [ + "3.44398", + "3.66280", + "4.13112" + ], + "Sr-K": [ + "14.1650", + "15.8357" + ], + "Sr-L": [ + "1.80656", + "1.87172" + ], + "Ta-K": [ + "57.532", + "65.223" + ], + "Ta-L": [ + "8.1461", + "9.3431", + "10.8952" + ], + "Tb-K": [ + "44.4816", + "50.382" + ], + "Tb-L": [ + "6.2728", + "6.978", + "8.102" + ], + "Tc-K": [ + "18.3671", + "20.619" + ], + "Tc-L": [ + "2.4240", + "2.5368" + ], + "Te-K": [ + "27.4723", + "30.9957" + ], + "Te-L": [ + "3.76933", + "4.02958", + "4.5709" + ], + "Th-K": [ + "93.350", + "105.609" + ], + "Th-L": [ + "12.9687", + "16.2022", + "18.9825" + ], + "Ti-K": [ + "4.51084", + "4.93181" + ], + "Ti-L": [ + "0.4522", + "0.4584" + ], + "Tl-K": [ + "72.8715", + "82.576" + ], + "Tl-L": [ + "10.2685", + "12.2133", + "14.2915" + ], + "Tm-K": [ + "50.7416", + "57.517" + ], + "Tm-L": [ + "7.1799", + "8.101", + "9.426" + ], + "U-K": [ + "98.439", + "111.300" + ], + "U-L": [ + "13.6147", + "17.2200", + "20.1671" + ], + "V-K": [ + "4.95220", + "5.42729" + ], + "V-L": [ + "0.5113", + "0.5192" + ], + "W-K": [ + "59.31824", + "67.2443" + ], + "W-L": [ + "8.3976", + "9.67235", + "11.2859" + ], + "Xe-K": [ + "29.779", + "33.624" + ], + "Xe-L": [ + "4.1099" + ], + "Y-K": [ + "14.9584", + "16.7378" + ], + "Y-L": [ + "1.92256", + "1.99584" + ], + "Yb-K": [ + "52.3889", + "59.37" + ], + "Yb-L": [ + "7.4156", + "8.4018", + "9.7801" + ], + "Zn-K": [ + "8.63886", + "9.5720" + ], + "Zn-L": [ + "1.0117", + "1.0347" + ], + "Zr-K": [ + "15.7751", + "17.6678" + ], + "Zr-L": [ + "2.04236", + "2.1244", + "2.3027" + ], + "intensities": { + "K": [ + "50", + "20", + "90" + ], + "L": [ + "10", + "50", + "5", + "5" + ] + } +} diff --git a/client/src/js/modules/calendar/views/calendar-view.vue b/client/src/js/modules/calendar/views/calendar-view.vue index 5e9eacaa6..e215bd1a8 100644 --- a/client/src/js/modules/calendar/views/calendar-view.vue +++ b/client/src/js/modules/calendar/views/calendar-view.vue @@ -244,7 +244,7 @@ export default { all: 1, } - queryParams.ty = this.proposalType + if (app.staff) queryParams.ty = this.proposalType if (this.selectedBeamline !== 'all') queryParams.bl = this.selectedBeamline const visitsCollection = new Visits(null, { @@ -477,10 +477,14 @@ export default { }, watch: { currentYear: { - handler: 'fetchVisitsCalendar' + handler: function(newVal, oldVal) { + if (oldVal != null) this.fetchVisitsCalendar() + } }, currentMonth: { - handler: 'fetchVisitsCalendar' + handler: function(newVal, oldVal) { + if (oldVal != null) this.fetchVisitsCalendar() + } } } } diff --git a/client/src/js/modules/imaging/views/queuecontainer.js b/client/src/js/modules/imaging/views/queuecontainer.js index 65972af09..2ec12d35d 100644 --- a/client/src/js/modules/imaging/views/queuecontainer.js +++ b/client/src/js/modules/imaging/views/queuecontainer.js @@ -569,6 +569,12 @@ define(['marionette', queueAllSamples: function(e) { e.preventDefault() + const data = {} + current = this.$el.find('.afilt').find('.current') + if (current.length > 0) { + data.filter = current.attr('id') + } + var self = this this.$el.addClass('loading'); Backbone.ajax({ diff --git a/client/src/js/templates/dc/dc.html b/client/src/js/templates/dc/dc.html index f1f81c2ba..e695d348d 100644 --- a/client/src/js/templates/dc/dc.html +++ b/client/src/js/templates/dc/dc.html @@ -29,7 +29,7 @@

<% if (DCT == 'SAD' || DCT == 'OSC' || DCT == 'Diamond Anvil High Pressure') { %> <%if (TOTALABSDOSE) { %> <%if (DCC > 1) { %> -
  • Total Dose: <%-TOTALABSDOSE * DCC%>MGy
  • +
  • Total Dose: <%-TOTALDOSE%>MGy
  • <% } else { %>
  • Dose: <%-TOTALABSDOSE%>MGy
  • <% } } }%> diff --git a/client/src/js/templates/dc/dc_autoproc.html b/client/src/js/templates/dc/dc_autoproc.html index 6969b9ebd..cde85c1f9 100644 --- a/client/src/js/templates/dc/dc_autoproc.html +++ b/client/src/js/templates/dc/dc_autoproc.html @@ -33,8 +33,6 @@ Lookup Cell

    - - <% if (PROPOSAL_TYPE != 'sm') { %> @@ -66,7 +64,6 @@ <% if (BEAM.REFINEDYBEAM > 0 && (Math.abs(BEAM.XBEAM-BEAM.REFINEDYBEAM) > 0.5 || Math.abs(BEAM.YBEAM-BEAM.REFINEDXBEAM) > 0.5)) { %>

    WARNING: Beam centre has moved significantly during refinement! (>0.5mm)

    <% } %> - <% } %>