Skip to content

Commit ad1b919

Browse files
ndg63276Mark Williams
andauthored
LIMS-1537: Add more options to reprocessing (#876)
* LIMS-1536: Add more options to reprocessing * LIMS-1537: Fix colour on successful submission --------- Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
1 parent f4393fb commit ad1b919

File tree

5 files changed

+74
-8
lines changed

5 files changed

+74
-8
lines changed

client/src/js/modules/dc/views/reprocess2.js

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ define(['backbone', 'marionette', 'views/dialog',
4646
ind: 'div.ind',
4747
pipeline: 'select[name=pipeline]',
4848
res: 'input[name=res]',
49-
sg: 'select[name=SG]'
49+
lowres: 'input[name=lowres]',
50+
sg: 'input[name=SG]'
5051
},
5152

5253
events: {
@@ -71,13 +72,18 @@ define(['backbone', 'marionette', 'views/dialog',
7172

7273
'change @ui.pipeline': 'updatePipeline',
7374
'change @ui.res': 'updateRes',
75+
'change @ui.lowres': 'updateLowRes',
7476
},
7577

7678

7779
updateRes: function() {
7880
this.model.set('RES', this.ui.res.val())
7981
},
8082

83+
updateLowRes: function() {
84+
this.model.set('LOWRES', this.ui.lowres.val())
85+
},
86+
8187
updatePipeline: function() {
8288
this.model.set('PIPELINE', this.ui.pipeline.val())
8389
},
@@ -139,6 +145,7 @@ define(['backbone', 'marionette', 'views/dialog',
139145
this.ui.ind.hide()
140146
this.$el.find('ul').addClass('half')
141147
this.$el.find('li input[type="text"]').css('width', '25%')
148+
this.$el.find('div input[type="text"]').css('width', '50px')
142149
this.ui.pipeline.html(this.getOption('pipelines').opts())
143150
this.model.set('PIPELINE', this.ui.pipeline.val())
144151
},
@@ -172,7 +179,7 @@ define(['backbone', 'marionette', 'views/dialog',
172179
this.ui.be.val(c['CELL_BE']).trigger('change')
173180
this.ui.ga.val(c['CELL_GA']).trigger('change')
174181

175-
this.ui.sg.val(a['SG']).trigger('change')
182+
this.ui.sg.val(a.get('SG')).trigger('change')
176183
}
177184
},
178185

@@ -213,6 +220,12 @@ define(['backbone', 'marionette', 'views/dialog',
213220
}, KVCollection))
214221

215222

223+
var AbsorptionLevels = Backbone.Collection.extend(_.extend({
224+
keyAttribute: 'NAME',
225+
valueAttribute: 'VALUE',
226+
}, KVCollection))
227+
228+
216229
return ReprocessView = DialogView.extend({
217230
template: template,
218231
dialog: true,
@@ -233,6 +246,7 @@ define(['backbone', 'marionette', 'views/dialog',
233246
sg: 'select[name=sg]',
234247
sm: 'input[name=sm]',
235248
indexingMethod: 'select[name=method]',
249+
absorptionLevel: 'select[name=absorption_level]',
236250
},
237251

238252
buttons: {
@@ -287,7 +301,7 @@ define(['backbone', 'marionette', 'views/dialog',
287301
},
288302

289303
xia2params: function() {
290-
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method']
304+
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method', 'absorption_level']
291305
},
292306

293307
integrate: function(e) {
@@ -327,6 +341,12 @@ define(['backbone', 'marionette', 'views/dialog',
327341
PARAMETERVALUE: sw.get('RES')
328342
}))
329343

344+
if (sw.get('LOWRES')) reprocessingparams.add(new ReprocessingParameter({
345+
PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'),
346+
PARAMETERKEY: 'd_max',
347+
PARAMETERVALUE: sw.get('LOWRES')
348+
}))
349+
330350
var hascell = true
331351
var cell = []
332352
_.each(['CELL_A', 'CELL_B', 'CELL_C', 'CELL_ALPHA', 'CELL_BETA', 'CELL_GAMMA'], function(f, i) {
@@ -416,6 +436,13 @@ define(['backbone', 'marionette', 'views/dialog',
416436
PARAMETERVALUE: res
417437
}))
418438

439+
var lowres = self.$el.find('input[name=lowres]').val()
440+
if (lowres) reprocessingparams.add(new ReprocessingParameter({
441+
PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'),
442+
PARAMETERKEY: 'd_max',
443+
PARAMETERVALUE: lowres
444+
}))
445+
419446
var hascell = true
420447
var cell = []
421448
_.each(['a', 'b', 'c', 'alpha', 'beta', 'gamma'], function(f, i) {
@@ -505,6 +532,7 @@ define(['backbone', 'marionette', 'views/dialog',
505532
onRender: function() {
506533
this.ui.opts.hide()
507534
this.ui.cell.hide()
535+
this.$el.find('span input[type="text"]').css('width', '50px')
508536

509537
this.pipelines = new Pipelines([
510538
{ NAME: 'Xia2 DIALS', VALUE: 'xia2-dials' },
@@ -524,6 +552,15 @@ define(['backbone', 'marionette', 'views/dialog',
524552

525553
this.ui.indexingMethod.html(this.indexingMethods.opts())
526554

555+
this.absorptionLevels = new AbsorptionLevels([
556+
{ NAME: '-', VALUE: '' },
557+
{ NAME: 'Low', VALUE: 'low' },
558+
{ NAME: 'Medium', VALUE: 'medium' },
559+
{ NAME: 'High', VALUE: 'high' },
560+
])
561+
562+
this.ui.absorptionLevel.html(this.absorptionLevels.opts())
563+
527564
// asynchronously load space groups into the select menu
528565
this.showSpaceGroups()
529566

client/src/js/modules/mc/views/datacollections.js

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ define(['backbone', 'marionette',
4242
}, KVCollection))
4343

4444

45+
var AbsorptionLevels = Backbone.Collection.extend(_.extend({
46+
keyAttribute: 'NAME',
47+
valueAttribute: 'VALUE',
48+
}, KVCollection))
49+
50+
4551
return Marionette.LayoutView.extend({
4652
className: 'content',
4753
template: template,
@@ -63,6 +69,7 @@ define(['backbone', 'marionette',
6369
wait: '.wait',
6470
pipeline: 'select[name=pipeline]',
6571
indexingMethod: 'select[name=method]',
72+
absorptionLevel: 'select[name=absorption_level]',
6673
opts: 'div.options',
6774
sm: 'input[name=sm]',
6875
sg: 'select[name=sg]',
@@ -94,7 +101,7 @@ define(['backbone', 'marionette',
94101
},
95102

96103
xia2params: function() {
97-
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method']
104+
return ['cc_half', 'isigma', 'misigma', 'sigma_strong', 'method', 'absorption_level']
98105
},
99106

100107
integrate: function(e) {
@@ -127,6 +134,13 @@ define(['backbone', 'marionette',
127134
PARAMETERVALUE: res
128135
}))
129136

137+
var lowres = self.$el.find('input[name=lowres]').val()
138+
if (lowres) reprocessingparams.add(new ReprocessingParameter({
139+
PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID'),
140+
PARAMETERKEY: 'd_max',
141+
PARAMETERVALUE: lowres
142+
}))
143+
130144
var hascell = true
131145
var cell = []
132146
_.each(['a', 'b', 'c', 'alpha', 'beta', 'gamma'], function(f, i) {
@@ -179,7 +193,7 @@ define(['backbone', 'marionette',
179193
var reprocessingsweeps = new ReprocessingImageSweeps(sweeps)
180194
reprocessingsweeps.save()
181195

182-
app.alert({ message: '1 reprocessing job successfully submitted'})
196+
app.message({ message: '1 reprocessing job successfully submitted'})
183197
self._enqueue({ PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID') })
184198
},
185199

@@ -252,6 +266,15 @@ define(['backbone', 'marionette',
252266
])
253267

254268
this.ui.indexingMethod.html(this.indexingMethods.opts())
269+
270+
this.absorptionLevels = new AbsorptionLevels([
271+
{ NAME: '-', VALUE: '' },
272+
{ NAME: 'Low', VALUE: 'low' },
273+
{ NAME: 'Medium', VALUE: 'medium' },
274+
{ NAME: 'High', VALUE: 'high' },
275+
])
276+
277+
this.ui.absorptionLevel.html(this.absorptionLevels.opts())
255278
},
256279

257280
setCell: function(view, ap) {

client/src/js/templates/dc/reprocess.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<span class="multi form">
1212
|
1313
Pipeline :<select name="pipeline"></select>
14-
High Res :<input type="text" name="res" /> &#197; |
14+
High Res :<input type="text" name="res" /> &#197;
15+
Low Res :<input type="text" name="lowres" /> &#197; |
1516
<a href="#" class="button sgm">Space Group / Cell</a>
1617
<!-- Comments: <input type="text" name="comments" class="full" /> -->
1718
</span>
@@ -36,7 +37,9 @@
3637
<label>Unmerged &lt;I/sigI&gt; :<input type="text" name="isigma" /></label>
3738
<label>Merged &lt;I/sigI&gt; :<input type="text" name="misigma" /></label>
3839
<label>Spot Finding Threshold :<input type="text" name="sigma_strong" /></label>
40+
<br /><br />
3941
<label>Indexing Method: <select name="method"></select></label>
42+
<label>Absorption Level: <select name="absorption_level"></select></label>
4043
</div>
4144

4245

client/src/js/templates/dc/reprocess_dc.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ <h1 class="clearfix">
77

88
<div class="ind data_collection">
99
Pipeline <select name="pipeline"></select>
10-
High Res <input type="text" name="res" /> &#197; |
10+
High Res <input type="text" name="res" /> &#197;
11+
Low Res <input type="text" name="lowres" /> &#197; |
1112
<a href="#" class="button sg">Space Group / Cell</a> <br />
1213
</div>
1314

client/src/js/templates/mc/datacollections.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ <h1>Data Collections for <%-VISIT%></h1>
2828
<label>&beta; <input type="text" name="beta" /></label>
2929
<label>&gamma; <input type="text" name="gamma" /></label>
3030

31-
<label>High Resolution <input type="text" name="res" /></label>
31+
<label>High Res <input type="text" name="res" /> &#197;</label>
32+
<label>Low Res <input type="text" name="lowres" /> &#197;</label>
3233

3334
<a href="#" class="button integrate" title="Integrate the selected data collections"><i class="fa fa-cog"></i> Integrate</a>
3435
<a href="#" class="button opt">Xia2 Options</a>
@@ -41,6 +42,7 @@ <h1>Data Collections for <%-VISIT%></h1>
4142
<label>Merged &lt;I/sigI&gt; :<input type="text" name="misigma" /></label>
4243
<label>Spot Finding Threshold :<input type="text" name="sigma_strong" /></label>
4344
<label>Indexing Method: <select name="method"></select></label>
45+
<label>Absorption Level: <select name="absorption_level"></select></label>
4446
</div>
4547

4648
<div class="dcs"></div>

0 commit comments

Comments
 (0)