You can subscribe to this list here.
| 2005 |
Jan
(70) |
Feb
(200) |
Mar
(222) |
Apr
(198) |
May
(122) |
Jun
(74) |
Jul
(171) |
Aug
(235) |
Sep
(118) |
Oct
(165) |
Nov
(276) |
Dec
(167) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(102) |
Feb
(124) |
Mar
(90) |
Apr
(155) |
May
(162) |
Jun
(285) |
Jul
(142) |
Aug
(136) |
Sep
(251) |
Oct
(188) |
Nov
(156) |
Dec
(144) |
| 2007 |
Jan
(231) |
Feb
(151) |
Mar
(142) |
Apr
(69) |
May
(66) |
Jun
(88) |
Jul
(61) |
Aug
(82) |
Sep
(125) |
Oct
(167) |
Nov
(115) |
Dec
(70) |
| 2008 |
Jan
(112) |
Feb
(109) |
Mar
(163) |
Apr
(239) |
May
(185) |
Jun
(147) |
Jul
(123) |
Aug
(142) |
Sep
(134) |
Oct
(106) |
Nov
(151) |
Dec
(114) |
| 2009 |
Jan
(143) |
Feb
(188) |
Mar
(121) |
Apr
(188) |
May
(193) |
Jun
(113) |
Jul
(161) |
Aug
(172) |
Sep
(95) |
Oct
(157) |
Nov
(123) |
Dec
(112) |
| 2010 |
Jan
(61) |
Feb
(115) |
Mar
(163) |
Apr
(138) |
May
(152) |
Jun
(133) |
Jul
(228) |
Aug
(135) |
Sep
(230) |
Oct
(214) |
Nov
(178) |
Dec
(225) |
| 2011 |
Jan
(197) |
Feb
(284) |
Mar
(244) |
Apr
(190) |
May
(119) |
Jun
(195) |
Jul
(305) |
Aug
(204) |
Sep
(175) |
Oct
(196) |
Nov
(166) |
Dec
(170) |
| 2012 |
Jan
(203) |
Feb
(197) |
Mar
(255) |
Apr
(153) |
May
(111) |
Jun
(130) |
Jul
(82) |
Aug
(207) |
Sep
(103) |
Oct
(173) |
Nov
(150) |
Dec
(171) |
| 2013 |
Jan
(156) |
Feb
(242) |
Mar
(216) |
Apr
(264) |
May
(116) |
Jun
(218) |
Jul
(192) |
Aug
(255) |
Sep
(157) |
Oct
(209) |
Nov
(227) |
Dec
(222) |
| 2014 |
Jan
(207) |
Feb
(214) |
Mar
(223) |
Apr
(125) |
May
(183) |
Jun
(213) |
Jul
(219) |
Aug
(230) |
Sep
(195) |
Oct
(275) |
Nov
(179) |
Dec
(163) |
| 2015 |
Jan
(227) |
Feb
(148) |
Mar
(148) |
Apr
(178) |
May
(228) |
Jun
(195) |
Jul
(155) |
Aug
(168) |
Sep
(168) |
Oct
(151) |
Nov
(259) |
Dec
(137) |
| 2016 |
Jan
(127) |
Feb
(244) |
Mar
(219) |
Apr
(266) |
May
(120) |
Jun
(366) |
Jul
(211) |
Aug
(203) |
Sep
(222) |
Oct
(155) |
Nov
(97) |
Dec
|
|
From: <kei...@us...> - 2016-10-31 11:29:47
|
Revision: 25675
http://sourceforge.net/p/cctbx/code/25675
Author: keitaroyam
Date: 2016-10-31 11:29:45 +0000 (Mon, 31 Oct 2016)
Log Message:
-----------
Fixed serialization of a mask for an imageset
DIALS issue #236
Committed on behalf of Takanori
Modified Paths:
--------------
trunk/dxtbx/datablock.py
Modified: trunk/dxtbx/datablock.py
===================================================================
--- trunk/dxtbx/datablock.py 2016-10-28 11:39:43 UTC (rev 25674)
+++ trunk/dxtbx/datablock.py 2016-10-31 11:29:45 UTC (rev 25675)
@@ -230,7 +230,6 @@
for i in xrange(len(iset)):
image_dict = OrderedDict()
image_dict['filename'] = abspath(iset.get_path(i))
- image_dict["mask"] = abspath_or_none(iset.external_lookup.mask.filename)
image_dict["gain"] = abspath_or_none(iset.external_lookup.gain.filename)
image_dict["pedestal"] = abspath_or_none(iset.external_lookup.pedestal.filename)
if iset.reader().is_single_file_reader():
@@ -252,6 +251,7 @@
except Exception:
pass
image_list.append(image_dict)
+ imageset["mask"] = abspath_or_none(iset.external_lookup.mask.filename)
imageset['images'] = image_list
imageset['params'] = iset.format_kwargs()
result['imageset'].append(imageset)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mge...@us...> - 2016-10-28 11:39:45
|
Revision: 25674
http://sourceforge.net/p/cctbx/code/25674
Author: mgerstel
Date: 2016-10-28 11:39:43 +0000 (Fri, 28 Oct 2016)
Log Message:
-----------
Fix discovery for test functions buried in classess
Modified Paths:
--------------
trunk/libtbx/test_utils/pytest.py
Modified: trunk/libtbx/test_utils/pytest.py
===================================================================
--- trunk/libtbx/test_utils/pytest.py 2016-10-27 23:29:40 UTC (rev 25673)
+++ trunk/libtbx/test_utils/pytest.py 2016-10-28 11:39:43 UTC (rev 25674)
@@ -51,7 +51,7 @@
class TestDiscoveryPlugin:
def pytest_itemcollected(self, item):
test_list.append([ "libtbx.python", "-m", "pytest", '--noconftest',
- os.path.join(dist_dir, item.nodeid) ])
+ '"%s"' % os.path.join(dist_dir, item.nodeid) ])
pytest.main(['-qq', '--collect-only', '--noconftest', dist_dir] + pytestargs, plugins=[TestDiscoveryPlugin()])
return test_list
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nwm...@us...> - 2016-10-27 23:29:42
|
Revision: 25673
http://sourceforge.net/p/cctbx/code/25673
Author: nwmoriarty
Date: 2016-10-27 23:29:40 +0000 (Thu, 27 Oct 2016)
Log Message:
-----------
added some Glyco chiral values
Modified Paths:
--------------
trunk/mmtbx/monomer_library/glyco_chiral_values.py
Modified: trunk/mmtbx/monomer_library/glyco_chiral_values.py
===================================================================
--- trunk/mmtbx/monomer_library/glyco_chiral_values.py 2016-10-27 09:29:00 UTC (rev 25672)
+++ trunk/mmtbx/monomer_library/glyco_chiral_values.py 2016-10-27 23:29:40 UTC (rev 25673)
@@ -73,6 +73,7 @@
'BGP' : 2.4,
'BGS' : 3.0,
'BHG' : 2.4,
+ 'BM7' : 2.4,
'BMA' : 2.4,
'BMX' : -2.4,
'BNG' : 2.4,
@@ -269,10 +270,13 @@
'SGN' : -2.4,
'SHB' : 2.4,
'SHG' : 2.4,
+ 'SIZ' : 2.4,
'SOE' : -2.6,
'SSG' : 3.0,
'SUS' : -2.2,
'T6T' : 2.6,
+ 'TGK' : 2.6,
+ 'TGY' : 2.6,
'TM9' : 2.4,
'TMR' : 2.4,
'TMX' : 2.4,
@@ -285,9 +289,11 @@
'X2F' : -2.4,
'X6X' : -2.4,
'XLF' : -2.6,
+ 'XXM' : -2.5,
'XXR' : -2.4,
'XYP' : 2.4,
'XYS' : -2.4,
+ 'Z3Q' : 2.4,
'Z6J' : 2.5,
'Z9M' : 2.4,
}
@@ -364,6 +370,7 @@
'BGP' : 'beta',
'BGS' : 'alpha',
'BHG' : 'beta',
+ 'BM7' : 'beta',
'BMA' : 'beta',
'BMX' : 'alpha',
'BNG' : 'beta',
@@ -560,10 +567,13 @@
'SGN' : 'alpha',
'SHB' : 'alpha',
'SHG' : 'beta',
+ 'SIZ' : 'beta',
'SOE' : 'alpha',
'SSG' : 'beta',
'SUS' : 'alpha',
'T6T' : 'alpha',
+ 'TGK' : 'beta',
+ 'TGY' : 'alpha',
'TM9' : 'beta',
'TMR' : 'beta',
'TMX' : 'beta',
@@ -576,9 +586,11 @@
'X2F' : 'alpha',
'X6X' : 'alpha',
'XLF' : 'beta',
+ 'XXM' : 'alpha',
'XXR' : 'alpha',
'XYP' : 'beta',
'XYS' : 'alpha',
+ 'Z3Q' : 'beta',
'Z6J' : 'alpha',
'Z9M' : 'beta',
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jm...@us...> - 2016-10-27 09:29:02
|
Revision: 25672
http://sourceforge.net/p/cctbx/code/25672
Author: jmp85
Date: 2016-10-27 09:29:00 +0000 (Thu, 27 Oct 2016)
Log Message:
-----------
Fixed indices bug
Modified Paths:
--------------
trunk/dxtbx/imageset.py
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-26 19:04:03 UTC (rev 25671)
+++ trunk/dxtbx/imageset.py 2016-10-27 09:29:00 UTC (rev 25672)
@@ -470,6 +470,8 @@
array_range The image range (first, last)
'''
+
+
# If no reader is set then throw an exception
if not reader:
raise ValueError("ImageSet needs a reader!")
@@ -1660,6 +1662,7 @@
format_class = Registry.find(filenames[0])
# Create the reader
+ indices = None
if format_class is None:
if template_format is not None:
filenames = SweepFileList(template_format, array_range)
@@ -1671,10 +1674,9 @@
assert len(filenames) == 1
format_instance = format_class(filenames[0], **format_kwargs)
reader = SingleFileReader(format_instance)
- indices = [i - 1 for i in indices]
+ indices = list(range(*array_range))
else:
assert(template_format is not None)
- indices = None
filenames = SweepFileList(template_format, array_range)
reader = MultiFileReader(format_class, filenames,
format_kwargs=format_kwargs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nks...@us...> - 2016-10-26 19:04:05
|
Revision: 25671
http://sourceforge.net/p/cctbx/code/25671
Author: nksauter
Date: 2016-10-26 19:04:03 +0000 (Wed, 26 Oct 2016)
Log Message:
-----------
cxi.merge: much more extensive reporting of the reason why lattices are rejected from merging. Note, the reports show up in the cxi.merge logfile, not cxi.xmerge.
Modified Paths:
--------------
trunk/xfel/command_line/cxi_merge.py
trunk/xfel/cxi/merging_utils.py
trunk/xfel/cxi/postrefinement_hybrid_rs.py
trunk/xfel/cxi/postrefinement_legacy_rs.py
trunk/xfel/cxi/postrefinement_updated_rs.py
Modified: trunk/xfel/command_line/cxi_merge.py
===================================================================
--- trunk/xfel/command_line/cxi_merge.py 2016-10-26 15:49:23 UTC (rev 25670)
+++ trunk/xfel/command_line/cxi_merge.py 2016-10-26 19:04:03 UTC (rev 25671)
@@ -559,6 +559,7 @@
self.n_wrong_bravais = 0
self.n_wrong_cell = 0
self.n_low_corr = 0
+ self.failure_modes = {}
self.observations = flex.int()
self.corr_values = flex.double()
self.rejected_fractions = flex.double()
@@ -612,13 +613,17 @@
self.n_wrong_cell
print >> self.log, " %d rejected for low signal" % \
self.n_low_signal
- print >> self.log, " %d rejected due to poor correlation" % \
+ print >> self.log, " %d rejected due to up-front poor correlation under min_corr parameter" % \
self.n_low_corr
print >> self.log, " %d rejected for file errors or no reindex matrix" % \
self.n_file_error
+ for key in self.failure_modes.keys():
+ print >>self.log, " %d rejected due to %s"%(self.failure_modes[key], key)
+
checksum = self.n_accepted + self.n_file_error \
+ self.n_low_corr + self.n_low_signal \
- + self.n_wrong_bravais + self.n_wrong_cell
+ + self.n_wrong_bravais + self.n_wrong_cell \
+ + sum([val for val in self.failure_modes.itervalues()])
assert checksum == len(file_names)
if self.params.raw_data.sdfac_refine:
@@ -694,6 +699,13 @@
self.n_wrong_bravais += 1
elif (data.wrong_cell) :
self.n_wrong_cell += 1
+ elif (getattr(data,"reason",None) is not None):
+ if str(data.reason)!="":
+ self.failure_modes[str(data.reason)] = self.failure_modes.get(str(data.reason),0) + 1
+ elif repr(type(data.reason))!="":
+ self.failure_modes[repr(type(data.reason))] = self.failure_modes.get(repr(type(data.reason)),0) + 1
+ else:
+ self.failure_modes["other reasons"] = self.failure_modes.get("other reasons",0) + 1
return
if (data.accept) :
self.n_accepted += 1
@@ -731,6 +743,8 @@
self.n_processed += data.n_processed
self.n_wrong_bravais += data.n_wrong_bravais
self.n_wrong_cell += data.n_wrong_cell
+ for key in data.failure_modes.keys():
+ self.failure_modes[key] = self.failure_modes.get(key,0) + data.failure_modes[key]
for index, isigi in data.ISIGI.iteritems() :
if (index in self.ISIGI):
@@ -1469,7 +1483,7 @@
postx.run_plain()
observations_original_index,observations,matches = postx.result_for_cxi_merge(file_name)
except (AssertionError,ValueError,RuntimeError),e:
- return null_data(file_name=file_name, log_out=out.getvalue(), low_signal=True)
+ return null_data(file_name=file_name, log_out=out.getvalue(), reason=e)
if self.params.postrefinement.show_trumpet_plot is True:
from xfel.cxi.trumpet_plot import trumpet_wrapper
Modified: trunk/xfel/cxi/merging_utils.py
===================================================================
--- trunk/xfel/cxi/merging_utils.py 2016-10-26 15:49:23 UTC (rev 25670)
+++ trunk/xfel/cxi/merging_utils.py 2016-10-26 19:04:03 UTC (rev 25671)
@@ -51,7 +51,8 @@
file_error=False,
low_signal=False,
wrong_bravais=False,
- wrong_cell=False) :
+ wrong_cell=False,
+ reason=None) :
adopt_init_args(self, locals())
def show_log_out (self, out) :
Modified: trunk/xfel/cxi/postrefinement_hybrid_rs.py
===================================================================
--- trunk/xfel/cxi/postrefinement_hybrid_rs.py 2016-10-26 15:49:23 UTC (rev 25670)
+++ trunk/xfel/cxi/postrefinement_hybrid_rs.py 2016-10-26 19:04:03 UTC (rev 25671)
@@ -162,7 +162,7 @@
#avoid empty database INSERT, if insufficient centrally-located Bragg spots:
# in samosa, handle this at a higher level, but handle it somehow.
if fat_count < 3:
- raise ValueError
+ raise ValueError, "< 3 near-fulls after refinement"
print >> self.out, "On total %5d the fat selection is %5d"%(
len(self.observations_pair1_selected.indices()), fat_count)
observations_original_index = \
@@ -183,10 +183,10 @@
print >> self.out, "CORR: NEW correlation is", SWC.corr
self.final_corr = SWC.corr
#another range assertion
- assert self.final_corr > 0.1
+ assert self.final_corr > 0.1,"correlation coefficient out of range (<= 0.1) after LevMar refinement"
# XXX Specific to the hybrid_rs method, and likely these limits are problem-specific (especially G-max) so look for another approach
# or expose the limits as phil parameters.
- assert values.G < 0.5
+ assert values.G < 0.5 , "G-scale value out of range ( > 0.5 XXX may be too strict ) after LevMar refinement"
return observations_original_index,observations,matches
@@ -272,13 +272,15 @@
def build_up(pfh, objective_only=False):
values = pfh.parameterization(pfh.x)
- assert 0. < values.G
+ assert 0. < values.G , "G-scale value out of range ( < 0 ) within LevMar build_up"
# XXX revisit these limits. Seems like an ad hoc approach to have to set these limits
- # Moreover, these tests throw out ~30% of LM14 data, thus search for another approach
- assert -150. < values.BFACTOR < 150. ,"limits on the exponent, please"
- assert -0.5 < 180.*values.thetax/math.pi < 0.5 , "limits on the theta rotation, please"
- assert -0.5 < 180.*values.thetay/math.pi < 0.5 , "limits on the theta rotation, please"
- assert 0.000001 < values.RS < 0.0003 , "limits on the RLP size, please"
+ # However, the assertions are necessary to avoid floating point exceptions at the C++ level
+ # Regardless, these tests throw out ~30% of LM14 data, thus search for another approach
+ assert -150. < values.BFACTOR < 150. ,"B-factor out of range (+/-150) within LevMar build_up"
+ assert -0.5 < 180.*values.thetax/math.pi < 0.5 , "thetax out of range ( |rotx|>.5 degrees ) within LevMar build_up"
+ assert -0.5 < 180.*values.thetay/math.pi < 0.5 , "thetay out of range ( |roty|>.5 degrees ) within LevMar build_up"
+ assert 0.000001 < values.RS , "RLP size out of range (<0.000001) within LevMar build_up"
+ assert values.RS < 0.001 , "RLP size out of range (>0.001) within LevMar build_up"
residuals = pfh.refinery.fvec_callable(values)
pfh.reset()
if objective_only:
Modified: trunk/xfel/cxi/postrefinement_legacy_rs.py
===================================================================
--- trunk/xfel/cxi/postrefinement_legacy_rs.py 2016-10-26 15:49:23 UTC (rev 25670)
+++ trunk/xfel/cxi/postrefinement_legacy_rs.py 2016-10-26 19:04:03 UTC (rev 25671)
@@ -144,7 +144,7 @@
#avoid empty database INSERT, if insufficient centrally-located Bragg spots:
# in samosa, handle this at a higher level, but handle it somehow.
if fat_count < 3:
- raise ValueError
+ raise ValueError, "< 3 near-fulls after refinement"
print >> self.out, "On total %5d the fat selection is %5d"%(
len(self.observations_pair1_selected.indices()), fat_count)
observations_original_index = \
Modified: trunk/xfel/cxi/postrefinement_updated_rs.py
===================================================================
--- trunk/xfel/cxi/postrefinement_updated_rs.py 2016-10-26 15:49:23 UTC (rev 25670)
+++ trunk/xfel/cxi/postrefinement_updated_rs.py 2016-10-26 19:04:03 UTC (rev 25671)
@@ -142,10 +142,10 @@
def rs2_parameter_range_assertions(self,values):
# New range assertions for refined variables
- assert 0 < values.G
- assert -25 < values.BFACTOR and values.BFACTOR < 25
- assert -0.5 < 180.*values.thetax/math.pi < 0.5 , "limits on the theta rotation, please"
- assert -0.5 < 180.*values.thetay/math.pi < 0.5 , "limits on the theta rotation, please"
+ assert 0 < values.G, "G-scale value out of range ( < 0 ) after rs2 refinement"
+ assert -25 < values.BFACTOR and values.BFACTOR < 25, "B-factor value out of range ( |B|>25 ) after rs2 refinement"
+ assert -0.5<180.*values.thetax/math.pi<0.5,"thetax value out of range ( |rotx|>.5 degrees ) after rs2 refinement"
+ assert -0.5<180.*values.thetay/math.pi<0.5,"thetay value out of range ( |roty|>.5 degrees ) after rs2 refinement"
def result_for_cxi_merge(self, file_name):
values = self.get_parameter_values()
@@ -164,7 +164,7 @@
#avoid empty database INSERT, if insufficient centrally-located Bragg spots:
# in samosa, handle this at a higher level, but handle it somehow.
if fat_count < 3:
- raise ValueError
+ raise ValueError, "< 3 near-fulls after refinement"
print >> self.out, "On total %5d the fat selection is %5d"%(
len(self.observations_pair1_selected.indices()), fat_count)
observations_original_index = \
@@ -186,7 +186,7 @@
self.final_corr = SWC.corr
self.refined_mini = self.MINI
#another range assertion
- assert self.final_corr > 0.1
+ assert self.final_corr > 0.1,"correlation coefficient out of range (<= 0.1) after rs2 refinement"
return observations_original_index,observations,matches
@@ -269,7 +269,7 @@
def compute_functional_and_gradients(self):
values = self.parameterization(self.x)
- assert -150. < values.BFACTOR < 150. # limits on the exponent, please
+ assert -150. < values.BFACTOR < 150,"B-factor out of range (+/-150) within rs2 functional and gradients"
self.func = self.refinery.fvec_callable(values)
functional = flex.sum(self.refinery.WEIGHTS*self.func*self.func)
self.f = functional
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2016-10-26 15:49:26
|
Revision: 25670
http://sourceforge.net/p/cctbx/code/25670
Author: rjgildea
Date: 2016-10-26 15:49:23 +0000 (Wed, 26 Oct 2016)
Log Message:
-----------
sister commit to r24040 for multi-panel detectors; see also dials/dials#55
Revision Links:
--------------
http://sourceforge.net/p/cctbx/code/24040
Modified Paths:
--------------
trunk/iotbx/detectors/display.h
Modified: trunk/iotbx/detectors/display.h
===================================================================
--- trunk/iotbx/detectors/display.h 2016-10-26 15:35:45 UTC (rev 25669)
+++ trunk/iotbx/detectors/display.h 2016-10-26 15:49:23 UTC (rev 25670)
@@ -839,7 +839,7 @@
//std::cout<<"the 90-percentile pixel value is "<<percentile<<std::endl;
double adjlevel = 0.4;
- correction = (percentile>0.) ? brightness * adjlevel/percentile : 1.0;
+ correction = (percentile>0.) ? brightness * adjlevel/percentile : brightness / 5.0;
}
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ph...@us...> - 2016-10-26 15:35:47
|
Revision: 25669
http://sourceforge.net/p/cctbx/code/25669
Author: phyy-nx
Date: 2016-10-26 15:35:45 +0000 (Wed, 26 Oct 2016)
Log Message:
-----------
Also flip X on d0
Modified Paths:
--------------
trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py
Modified: trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py
===================================================================
--- trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py 2016-10-26 15:33:55 UTC (rev 25668)
+++ trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py 2016-10-26 15:35:45 UTC (rev 25669)
@@ -134,9 +134,9 @@
detector = Detector()
root = detector.hierarchy()
root.set_frame(
- (1, 0, 0),
- (0, 1, 0),
- (0, 0, - self.distance))
+ (-1, 0, 0),
+ ( 0, 1, 0),
+ ( 0, 0, - self.distance))
for i in range(8):
angle = math.pi * self.panel_rotations[i] / 180.0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ph...@us...> - 2016-10-26 15:33:58
|
Revision: 25668
http://sourceforge.net/p/cctbx/code/25668
Author: phyy-nx
Date: 2016-10-26 15:33:55 +0000 (Wed, 26 Oct 2016)
Log Message:
-----------
Sign flip requested by @biochem_fan
Modified Paths:
--------------
trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py
Modified: trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py
===================================================================
--- trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py 2016-10-26 10:46:46 UTC (rev 25667)
+++ trunk/dxtbx/format/FormatHDF5SaclaMPCCD.py 2016-10-26 15:33:55 UTC (rev 25668)
@@ -121,7 +121,7 @@
distance = self.distance,
beam_centre = (self.RECONST_SIZE / 2 * self.PIXEL_SIZE,
self.RECONST_SIZE / 2 * self.PIXEL_SIZE),
- fast_direction = '+x',
+ fast_direction = '-x',
slow_direction = '-y',
pixel_size = (self.PIXEL_SIZE,
self.PIXEL_SIZE),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mar...@di...> - 2016-10-26 12:52:21
|
Hi James, this commit broke xia2 tests. Run $ libtbx.python $(libtbx.find_in_repositories xia2/Test/Modules/Indexer/TstMosflmIndexer.py) 1 trace: http://jenkins.diamond.ac.uk:8080/view/DIALS/job/xia2_tests/5248/testReport/junit/Modules/Indexer/TstLabelitIndexer/ ________________________________________ From: jm...@us... [jm...@us...] Sent: Wednesday, October 26, 2016 11:46 To: cct...@li... Subject: [Cctbx-cvs] SF.net SVN: cctbx:[25667] trunk/dxtbx Revision: 25667 http://sourceforge.net/p/cctbx/code/25667 Author: jmp85 Date: 2016-10-26 10:46:46 +0000 (Wed, 26 Oct 2016) Log Message: ----------- Fixed bugs in eiger slicing. One bug involved removing gonio+scan and serializing. Deserializing then added the gonio+scan back again due to a feature that is never used where if they are missing in the file they are read from the imageset. I've removed this feature since it causes other things to break. Modified Paths: -------------- trunk/dxtbx/datablock.py trunk/dxtbx/imageset.py trunk/dxtbx/model/experiment/experiment_list.py trunk/dxtbx/tests/model/experiment/tst_experiment_list.py Modified: trunk/dxtbx/datablock.py =================================================================== --- trunk/dxtbx/datablock.py 2016-10-25 16:22:12 UTC (rev 25666) +++ trunk/dxtbx/datablock.py 2016-10-26 10:46:46 UTC (rev 25667) @@ -591,6 +591,7 @@ format_kwargs=None): ''' Create a multi file sweep or imageset. ''' from dxtbx.imageset import ImageSetFactory + from os.path import abspath # Make either an imageset or sweep if len(records) == 1 and records[0].template is not None: @@ -601,7 +602,7 @@ # Create the sweep imageset = ImageSetFactory.make_sweep( - records[0].template, range(*image_range), + abspath(records[0].template), range(*image_range), format_class, records[0].beam, records[0].detector, records[0].goniometer, records[0].scan, @@ -616,8 +617,10 @@ filenames.append(r.filename) # make an imageset - imageset = ImageSetFactory.make_imageset(filenames, format_class, - format_kwargs=format_kwargs) + imageset = ImageSetFactory.make_imageset( + map(abspath, filenames), + format_class, + format_kwargs=format_kwargs) for i, r in enumerate(records): imageset.set_beam(r.beam, i) imageset.set_detector(r.detector, i) @@ -631,9 +634,10 @@ format_kwargs=None): ''' Create an imageset from a multi image file. ''' from dxtbx.imageset import SingleFileReader, ImageSet, ImageSweep + from os.path import abspath if format_kwargs is None: format_kwargs = {} - format_instance = format_class(filename, **format_kwargs) + format_instance = format_class(abspath(filename), **format_kwargs) try: scan = format_instance.get_scan() if abs(scan.get_oscillation()[1]) > 0.0: @@ -733,6 +737,8 @@ elif "master" in imageset: template = load_path(imageset['master']) i0, i1 = scan.get_image_range() + indices = imageset['images'] + assert min(indices) == i0-1 and max(indices) == i1-1 iset = ImageSetFactory.make_sweep( template, range(i0, i1+1), None, beam, detector, gonio, scan, check_format, @@ -769,10 +775,8 @@ beam, detector, gonio, scan = load_models(image) iset.set_beam(beam, i) iset.set_detector(detector, i) - if gonio: - iset.set_goniometer(gonio, i) - if scan: - iset.set_scan(scan, i) + iset.set_goniometer(gonio, i) + iset.set_scan(scan, i) if 'mask' in imageset and imageset['mask'] is not None: imageset['mask'] = load_path(imageset['mask']) iset.external_lookup.mask.filename = imageset['mask'] Modified: trunk/dxtbx/imageset.py =================================================================== --- trunk/dxtbx/imageset.py 2016-10-25 16:22:12 UTC (rev 25666) +++ trunk/dxtbx/imageset.py 2016-10-26 10:46:46 UTC (rev 25667) @@ -496,7 +496,10 @@ self.external_lookup = ExternalLookup() # The format kwargs - self._format_kwargs = format_kwargs + if format_kwargs is None: + self._format_kwargs = {} + else: + self._format_kwargs = format_kwargs def __getitem__(self, item): ''' Get an item from the image set stream. @@ -1657,7 +1660,6 @@ format_class = Registry.find(filenames[0]) # Create the reader - indices = None if format_class is None: if template_format is not None: filenames = SweepFileList(template_format, array_range) @@ -1668,12 +1670,11 @@ format_kwargs = {} assert len(filenames) == 1 format_instance = format_class(filenames[0], **format_kwargs) - if scan is not None: - image0 = scan.get_array_range()[0] - indices = list(range(scan.get_num_images())) reader = SingleFileReader(format_instance) + indices = [i - 1 for i in indices] else: assert(template_format is not None) + indices = None filenames = SweepFileList(template_format, array_range) reader = MultiFileReader(format_class, filenames, format_kwargs=format_kwargs) Modified: trunk/dxtbx/model/experiment/experiment_list.py =================================================================== --- trunk/dxtbx/model/experiment/experiment_list.py 2016-10-25 16:22:12 UTC (rev 25666) +++ trunk/dxtbx/model/experiment/experiment_list.py 2016-10-26 10:46:46 UTC (rev 25667) @@ -541,7 +541,7 @@ if 'params' in imageset: format_kwargs = imageset['params'] else: - format_kwargs = None + format_kwargs = {} if 'mask' in imageset and imageset['mask'] is not None: mask_filename = load_path(imageset['mask']) if self._check_format: @@ -580,7 +580,7 @@ else: raise RuntimeError('Unknown imageset type') - # Fill in any models if they aren't already there + # Set the external lookup if imageset is not None: imageset.external_lookup.mask.data = mask imageset.external_lookup.mask.filename = mask_filename @@ -588,14 +588,6 @@ imageset.external_lookup.gain.filename = gain_filename imageset.external_lookup.pedestal.data = pedestal imageset.external_lookup.pedestal.filename = pedestal_filename - if beam is None: - beam = imageset.get_beam() - if detector is None: - detector = imageset.get_detector() - if goniometer is None: - goniometer = imageset.get_goniometer() - if scan is None: - scan = imageset.get_scan() # Update the imageset models if isinstance(imageset, ImageSweep): Modified: trunk/dxtbx/tests/model/experiment/tst_experiment_list.py =================================================================== --- trunk/dxtbx/tests/model/experiment/tst_experiment_list.py 2016-10-25 16:22:12 UTC (rev 25666) +++ trunk/dxtbx/tests/model/experiment/tst_experiment_list.py 2016-10-26 10:46:46 UTC (rev 25667) @@ -418,18 +418,18 @@ # Read all the experiment lists in el1 = ExperimentListFactory.from_json_file(filename1) - el2 = ExperimentListFactory.from_json_file(filename2) + #el2 = ExperimentListFactory.from_json_file(filename2) el3 = ExperimentListFactory.from_json_file(filename3) el4 = ExperimentListFactory.from_json_file(filename4) # All the experiment lists should be the same length assert(len(el1) == 1) - assert(len(el1) == len(el2)) + #assert(len(el1) == len(el2)) assert(len(el1) == len(el3)) assert(len(el1) == len(el4)) # Check all the models are the same - for e in zip(el1, el2, el3, el4): + for e in zip(el1, el3, el4): e1 = e[0] assert(e1.imageset is not None) assert(e1.beam is not None) @@ -492,7 +492,7 @@ # Get all the filenames filenames = [ join(self.path, 'experiment_test_data', 'experiment_1.json'), - join(self.path, 'experiment_test_data', 'experiment_2.json'), + #join(self.path, 'experiment_test_data', 'experiment_2.json'), join(self.path, 'experiment_test_data', 'experiment_3.json'), join(self.path, 'experiment_test_data', 'experiment_4.json')] @@ -500,8 +500,8 @@ experiments = ExperimentListFactory.from_args(filenames) # Have 4 experiment - assert(len(experiments) == 4) - for i in range(4): + assert(len(experiments) == 3) + for i in range(3): assert(experiments[i].imageset is not None) assert(experiments[i].beam is not None) assert(experiments[i].detector is not None) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik _______________________________________________ Cctbx-cvs mailing list Cct...@li... https://lists.sourceforge.net/lists/listinfo/cctbx-cvs -- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom |
|
From: <jm...@us...> - 2016-10-26 10:46:48
|
Revision: 25667
http://sourceforge.net/p/cctbx/code/25667
Author: jmp85
Date: 2016-10-26 10:46:46 +0000 (Wed, 26 Oct 2016)
Log Message:
-----------
Fixed bugs in eiger slicing. One bug involved removing gonio+scan and
serializing. Deserializing then added the gonio+scan back again due to a feature
that is never used where if they are missing in the file they are read from the
imageset. I've removed this feature since it causes other things to break.
Modified Paths:
--------------
trunk/dxtbx/datablock.py
trunk/dxtbx/imageset.py
trunk/dxtbx/model/experiment/experiment_list.py
trunk/dxtbx/tests/model/experiment/tst_experiment_list.py
Modified: trunk/dxtbx/datablock.py
===================================================================
--- trunk/dxtbx/datablock.py 2016-10-25 16:22:12 UTC (rev 25666)
+++ trunk/dxtbx/datablock.py 2016-10-26 10:46:46 UTC (rev 25667)
@@ -591,6 +591,7 @@
format_kwargs=None):
''' Create a multi file sweep or imageset. '''
from dxtbx.imageset import ImageSetFactory
+ from os.path import abspath
# Make either an imageset or sweep
if len(records) == 1 and records[0].template is not None:
@@ -601,7 +602,7 @@
# Create the sweep
imageset = ImageSetFactory.make_sweep(
- records[0].template, range(*image_range),
+ abspath(records[0].template), range(*image_range),
format_class,
records[0].beam, records[0].detector,
records[0].goniometer, records[0].scan,
@@ -616,8 +617,10 @@
filenames.append(r.filename)
# make an imageset
- imageset = ImageSetFactory.make_imageset(filenames, format_class,
- format_kwargs=format_kwargs)
+ imageset = ImageSetFactory.make_imageset(
+ map(abspath, filenames),
+ format_class,
+ format_kwargs=format_kwargs)
for i, r in enumerate(records):
imageset.set_beam(r.beam, i)
imageset.set_detector(r.detector, i)
@@ -631,9 +634,10 @@
format_kwargs=None):
''' Create an imageset from a multi image file. '''
from dxtbx.imageset import SingleFileReader, ImageSet, ImageSweep
+ from os.path import abspath
if format_kwargs is None:
format_kwargs = {}
- format_instance = format_class(filename, **format_kwargs)
+ format_instance = format_class(abspath(filename), **format_kwargs)
try:
scan = format_instance.get_scan()
if abs(scan.get_oscillation()[1]) > 0.0:
@@ -733,6 +737,8 @@
elif "master" in imageset:
template = load_path(imageset['master'])
i0, i1 = scan.get_image_range()
+ indices = imageset['images']
+ assert min(indices) == i0-1 and max(indices) == i1-1
iset = ImageSetFactory.make_sweep(
template, range(i0, i1+1), None,
beam, detector, gonio, scan, check_format,
@@ -769,10 +775,8 @@
beam, detector, gonio, scan = load_models(image)
iset.set_beam(beam, i)
iset.set_detector(detector, i)
- if gonio:
- iset.set_goniometer(gonio, i)
- if scan:
- iset.set_scan(scan, i)
+ iset.set_goniometer(gonio, i)
+ iset.set_scan(scan, i)
if 'mask' in imageset and imageset['mask'] is not None:
imageset['mask'] = load_path(imageset['mask'])
iset.external_lookup.mask.filename = imageset['mask']
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-25 16:22:12 UTC (rev 25666)
+++ trunk/dxtbx/imageset.py 2016-10-26 10:46:46 UTC (rev 25667)
@@ -496,7 +496,10 @@
self.external_lookup = ExternalLookup()
# The format kwargs
- self._format_kwargs = format_kwargs
+ if format_kwargs is None:
+ self._format_kwargs = {}
+ else:
+ self._format_kwargs = format_kwargs
def __getitem__(self, item):
''' Get an item from the image set stream.
@@ -1657,7 +1660,6 @@
format_class = Registry.find(filenames[0])
# Create the reader
- indices = None
if format_class is None:
if template_format is not None:
filenames = SweepFileList(template_format, array_range)
@@ -1668,12 +1670,11 @@
format_kwargs = {}
assert len(filenames) == 1
format_instance = format_class(filenames[0], **format_kwargs)
- if scan is not None:
- image0 = scan.get_array_range()[0]
- indices = list(range(scan.get_num_images()))
reader = SingleFileReader(format_instance)
+ indices = [i - 1 for i in indices]
else:
assert(template_format is not None)
+ indices = None
filenames = SweepFileList(template_format, array_range)
reader = MultiFileReader(format_class, filenames,
format_kwargs=format_kwargs)
Modified: trunk/dxtbx/model/experiment/experiment_list.py
===================================================================
--- trunk/dxtbx/model/experiment/experiment_list.py 2016-10-25 16:22:12 UTC (rev 25666)
+++ trunk/dxtbx/model/experiment/experiment_list.py 2016-10-26 10:46:46 UTC (rev 25667)
@@ -541,7 +541,7 @@
if 'params' in imageset:
format_kwargs = imageset['params']
else:
- format_kwargs = None
+ format_kwargs = {}
if 'mask' in imageset and imageset['mask'] is not None:
mask_filename = load_path(imageset['mask'])
if self._check_format:
@@ -580,7 +580,7 @@
else:
raise RuntimeError('Unknown imageset type')
- # Fill in any models if they aren't already there
+ # Set the external lookup
if imageset is not None:
imageset.external_lookup.mask.data = mask
imageset.external_lookup.mask.filename = mask_filename
@@ -588,14 +588,6 @@
imageset.external_lookup.gain.filename = gain_filename
imageset.external_lookup.pedestal.data = pedestal
imageset.external_lookup.pedestal.filename = pedestal_filename
- if beam is None:
- beam = imageset.get_beam()
- if detector is None:
- detector = imageset.get_detector()
- if goniometer is None:
- goniometer = imageset.get_goniometer()
- if scan is None:
- scan = imageset.get_scan()
# Update the imageset models
if isinstance(imageset, ImageSweep):
Modified: trunk/dxtbx/tests/model/experiment/tst_experiment_list.py
===================================================================
--- trunk/dxtbx/tests/model/experiment/tst_experiment_list.py 2016-10-25 16:22:12 UTC (rev 25666)
+++ trunk/dxtbx/tests/model/experiment/tst_experiment_list.py 2016-10-26 10:46:46 UTC (rev 25667)
@@ -418,18 +418,18 @@
# Read all the experiment lists in
el1 = ExperimentListFactory.from_json_file(filename1)
- el2 = ExperimentListFactory.from_json_file(filename2)
+ #el2 = ExperimentListFactory.from_json_file(filename2)
el3 = ExperimentListFactory.from_json_file(filename3)
el4 = ExperimentListFactory.from_json_file(filename4)
# All the experiment lists should be the same length
assert(len(el1) == 1)
- assert(len(el1) == len(el2))
+ #assert(len(el1) == len(el2))
assert(len(el1) == len(el3))
assert(len(el1) == len(el4))
# Check all the models are the same
- for e in zip(el1, el2, el3, el4):
+ for e in zip(el1, el3, el4):
e1 = e[0]
assert(e1.imageset is not None)
assert(e1.beam is not None)
@@ -492,7 +492,7 @@
# Get all the filenames
filenames = [
join(self.path, 'experiment_test_data', 'experiment_1.json'),
- join(self.path, 'experiment_test_data', 'experiment_2.json'),
+ #join(self.path, 'experiment_test_data', 'experiment_2.json'),
join(self.path, 'experiment_test_data', 'experiment_3.json'),
join(self.path, 'experiment_test_data', 'experiment_4.json')]
@@ -500,8 +500,8 @@
experiments = ExperimentListFactory.from_args(filenames)
# Have 4 experiment
- assert(len(experiments) == 4)
- for i in range(4):
+ assert(len(experiments) == 3)
+ for i in range(3):
assert(experiments[i].imageset is not None)
assert(experiments[i].beam is not None)
assert(experiments[i].detector is not None)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jm...@us...> - 2016-10-25 16:22:15
|
Revision: 25666
http://sourceforge.net/p/cctbx/code/25666
Author: jmp85
Date: 2016-10-25 16:22:12 +0000 (Tue, 25 Oct 2016)
Log Message:
-----------
Added patch to deal with paths in null reader for single image file
Modified Paths:
--------------
trunk/dxtbx/imageset.py
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-25 10:04:26 UTC (rev 25665)
+++ trunk/dxtbx/imageset.py 2016-10-25 16:22:12 UTC (rev 25666)
@@ -89,7 +89,7 @@
def get_path(self, index=None):
''' Get an image path. '''
- if index == None:
+ if index == None or self._single_file:
return self._filenames[0]
return self._filenames[index]
@@ -650,7 +650,10 @@
def paths(self):
''' Return a list of filenames referenced by this set. '''
filenames = self.reader().get_image_paths()
- return [filenames[i] for i in self._indices]
+ if self.reader().is_single_file_reader():
+ return [filenames[0]] * len(self._indices)
+ else:
+ return [filenames[i] for i in self._indices]
def is_valid(self):
''' Validate all the images in the image set. Can take a long time. '''
@@ -1596,7 +1599,7 @@
if format_class == None and check_format:
format_class = Registry.find(filenames[0])
if format_class is None:
- reader = NullReader(filenames)
+ reader = NullReader(filenames, single_file_indices is not None)
else:
if issubclass(format_class, FormatMultiImage):
assert len(set(filenames)) == 1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jm...@us...> - 2016-10-25 10:04:28
|
Revision: 25665
http://sourceforge.net/p/cctbx/code/25665
Author: jmp85
Date: 2016-10-25 10:04:26 +0000 (Tue, 25 Oct 2016)
Log Message:
-----------
Use get_format in imageset
Modified Paths:
--------------
trunk/dxtbx/imageset.py
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-25 10:00:45 UTC (rev 25664)
+++ trunk/dxtbx/imageset.py 2016-10-25 10:04:26 UTC (rev 25665)
@@ -566,7 +566,7 @@
'''
from scitbx.array_family import flex
- fmt = self.reader().get_format(index)
+ fmt = self.get_format(index)
gain = fmt.get_gain()
if gain is not None:
return gain
@@ -578,7 +578,7 @@
'''
from scitbx.array_family import flex
- fmt = self.reader().get_format(index)
+ fmt = self.get_format(index)
pedestal = fmt.get_pedestal()
if pedestal is not None:
return pedestal
@@ -594,7 +594,7 @@
# Check for a dynamic mask
if goniometer is None:
goniometer = self.get_goniometer(index)
- dyn_mask = self.reader().get_format(index).get_mask(goniometer=goniometer)
+ dyn_mask = self.get_format(index).get_mask(goniometer=goniometer)
if dyn_mask is None:
# Get the image and detector
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jm...@us...> - 2016-10-25 10:00:48
|
Revision: 25664
http://sourceforge.net/p/cctbx/code/25664
Author: jmp85
Date: 2016-10-25 10:00:45 +0000 (Tue, 25 Oct 2016)
Log Message:
-----------
Added a get_format to imageset
Modified Paths:
--------------
trunk/dxtbx/imageset.py
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-25 07:37:36 UTC (rev 25663)
+++ trunk/dxtbx/imageset.py 2016-10-25 10:00:45 UTC (rev 25664)
@@ -735,6 +735,10 @@
''' Get the path for the index '''
return self.reader().get_path(self._image_index(index))
+ def get_format(self, index):
+ ''' Get the format class for the index '''
+ return self.reader().get_format(self._image_index(index))
+
def get_image_identifier(self, index):
''' Get the path for the index '''
if isinstance(self.reader(), SingleFileReader):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gra...@us...> - 2016-10-25 07:37:37
|
Revision: 25663
http://sourceforge.net/p/cctbx/code/25663
Author: graeme_winter
Date: 2016-10-25 07:37:36 +0000 (Tue, 25 Oct 2016)
Log Message:
-----------
Somehow format object get_raw_data() method got mangled lately; no blame
Modified Paths:
--------------
trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py 2016-10-24 23:36:52 UTC (rev 25662)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py 2016-10-25 07:37:36 UTC (rev 25663)
@@ -281,7 +281,7 @@
def get_raw_data(self):
if not self._multi_panel:
- return super(FormatCBFMiniPilatusDLS6MSN100, self).get_raw_data()
+ return super(FormatCBFMiniPilatusDLS6MSN126, self).get_raw_data()
if self._raw_data is None:
raw_data = self.read_cbf_image(self._image_file)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ole...@us...> - 2016-10-24 23:36:55
|
Revision: 25662
http://sourceforge.net/p/cctbx/code/25662
Author: olegsobolev
Date: 2016-10-24 23:36:52 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
enabling a lot of tests. Adjusted sorry message.
Modified Paths:
--------------
trunk/iotbx/pdb/multimer_reconstruction.py
trunk/iotbx/pdb/tst_pdb_manipulation.py
Modified: trunk/iotbx/pdb/multimer_reconstruction.py
===================================================================
--- trunk/iotbx/pdb/multimer_reconstruction.py 2016-10-24 18:54:17 UTC (rev 25661)
+++ trunk/iotbx/pdb/multimer_reconstruction.py 2016-10-24 23:36:52 UTC (rev 25662)
@@ -88,18 +88,16 @@
"'ba': biological assembly \n" + \
"'cau': crystallographic asymmetric unit \n")
if (transform_info.as_pdb_string() == '' or
- not ncs_only(transform_info) or
transform_info.contains_only_identity_matrices()):
- transform_info = None
- else:
- transform_info = insure_identity_is_in_transform_info(transform_info)
+ raise Sorry('Sorry, no transform info of appropriate type was found.')
+ if not ncs_only(transform_info):
+ raise Sorry("Copies are already present in the file")
+ transform_info = insure_identity_is_in_transform_info(transform_info)
if len(pdb_obj.hierarchy.models()) > 1:
raise Sorry('Sorry, this feature currently supports on single models ' +
'hierarchies')
# Read the relevant transformation matrices
- if transform_info is None:
- raise Sorry('Sorry, no transform info of appropriate type was found.')
self.transforms_obj = iotbx.ncs.input(
hierarchy=pdb_obj.hierarchy,
transform_info=transform_info,
Modified: trunk/iotbx/pdb/tst_pdb_manipulation.py
===================================================================
--- trunk/iotbx/pdb/tst_pdb_manipulation.py 2016-10-24 18:54:17 UTC (rev 25661)
+++ trunk/iotbx/pdb/tst_pdb_manipulation.py 2016-10-24 23:36:52 UTC (rev 25662)
@@ -121,26 +121,6 @@
'chain B_002': 'F'}
self.assertEqual(result,expected)
- def test_identity_tranform_insertion(self):
- """
- Verify that insertion and reordering of the identity transform is done
- properly
- need to use exclude_selection=None because test pdb files contain only UNK
- residues.
- """
- # print sys._getframe().f_code.co_name
- for pdb_str in [pdb_test_data5,pdb_test_data6]:
- pdb_h = pdb.input(source_info=None, lines=pdb_str).construct_hierarchy()
- ncs_inp = ncs.input(hierarchy=pdb_h, exclude_selection=None)
- transform_info = ncs_inp.build_MTRIX_object()
- self.assertEqual(len(transform_info.r),3)
- self.assertEqual(len(transform_info.t),3)
- self.assertEqual(transform_info.r[0].is_r3_identity_matrix(),True)
- self.assertEqual(transform_info.t[0].is_col_zero(),True)
- sn = [int(x) for x in transform_info.serial_number]
- self.assertEqual(sn,[1,2,3])
-
-
# @unittest.SkipTest
def test_adding_transforms_directly(self):
"""
@@ -279,12 +259,13 @@
# print pdbstr
# print '--- from xray structure ---'
- xrs = pdb_hierarchy_asu.extract_xray_structure()
- pdbstr = transforms_obj.get_transform_records(
- # xrs=pdb_obj.xray_structure_simple(),
- xrs=xrs,
- biomt=True,
- write=False)
+ # Not clear why it is not working
+ # xrs = pdb_hierarchy_asu.extract_xray_structure()
+ # pdbstr = transforms_obj.get_transform_records(
+ # # xrs=pdb_obj.xray_structure_simple(),
+ # xrs=xrs,
+ # biomt=True,
+ # write=False)
# print pdbstr
# print '='*50
@@ -296,19 +277,21 @@
multimer_data = multimer(
pdb_str=pdb_test_data2,
reconstruction_type='cau')
- pdb_h = pdb.input(source_info=None, lines=pdb_test_data2).\
- construct_hierarchy()
- trans_obj = ncs.input(hierarchy=pdb_h)
-
+ pdb_inp = pdb.input(source_info=None, lines=pdb_test_data2)
+ t_i = pdb_inp.process_mtrix_records()
+ pdb_h = pdb_inp.construct_hierarchy()
+ trans_obj = ncs.input(
+ hierarchy=pdb_h,
+ transform_info=t_i)
pdb_hierarchy_asu = multimer_data.assembled_multimer
- print "pdb_hierarchy_asu", pdb_hierarchy_asu.as_pdb_string()
+ # print "pdb_hierarchy_asu", pdb_hierarchy_asu.as_pdb_string()
spec_output = trans_obj.get_ncs_info_as_spec(
pdb_hierarchy_asu=pdb_hierarchy_asu)
trans_obj2 = ncs.input(spec_ncs_groups=spec_output)
- print "t1", trans_obj.ncs_transform
- print "t2", trans_obj2.ncs_transform
+ # print "t1", trans_obj.ncs_transform
+ # print "t2", trans_obj2.ncs_transform
t1 = trans_obj.ncs_transform['0000000002'].r
t2 = trans_obj2.ncs_transform['0000000002'].r
self.assertEqual(t1,t2)
@@ -316,7 +299,7 @@
t1 = trans_obj.ncs_to_asu_selection
t1_expected = {'chain A or chain B':
- ['chain E or chain F', 'chain C or chain D']}
+ ['chain C or chain D', 'chain E or chain F']}
self.assertEqual(t1,t1_expected)
t2 = trans_obj2.ncs_to_asu_selection
t2_expected = {
@@ -327,12 +310,13 @@
['chain D and (resseq 4:5)', 'chain F and (resseq 4:5)']}
self.assertEqual(t2,t2_expected)
- t1 = trans_obj.tr_id_to_selection['chain A_003']
+ # print "trans_obj.tr_id_to_selection", trans_obj.tr_id_to_selection
+ t1 = trans_obj.tr_id_to_selection['chain A_0000000003']
t1_expected = ('chain A',
'chain E')
self.assertEqual(t1,t1_expected)
- t2 = trans_obj2.tr_id_to_selection['chain A_003']
+ t2 = trans_obj2.tr_id_to_selection['chain A_0000000003']
t2_expected = ('chain A and (resseq 1:3 or resseq 6:7)',
'chain E and (resseq 1:3 or resseq 6:7)')
self.assertEqual(t2,t2_expected)
@@ -413,22 +397,6 @@
elif method == 'cau':
self.assertEqual(ncs_obj.number_of_ncs_groups,2)
- # @unittest.SkipTest
- def test_ignoring_mtrix_rec(self):
- """
- Test ignoring MTRIX record when copies already present in file
- """
- pdb_inp = pdb.input(source_info=None, lines=test_pdb_9)
- m = multimer(
- pdb_str=test_pdb_9,
- round_coordinates=False,
- reconstruction_type='cau',
- error_handle=True,eps=1e-2)
- n1 = m.assembled_multimer.atoms().size()
- n2 = pdb_inp.atoms().size()
- self.assertEqual(n1,n2)
-
-
def tearDown(self):
'''remove temp files and folder'''
os.chdir(self.currnet_dir)
@@ -897,6 +865,46 @@
assert m.new_annotation.get_n_sheets() == 0, \
"expecing 0 sheets, got %d" % m.new_annotation.get_n_helices()
+def test_identity_tranform_insertion():
+ """
+ Verify that insertion and reordering of the identity transform is done
+ properly
+ need to use exclude_selection=None because test pdb files contain only UNK
+ residues.
+ """
+ for pdb_str in [pdb_test_data5,pdb_test_data6]:
+ pdb_inp = pdb.input(source_info=None, lines=pdb_str)
+ t_i=pdb_inp.process_mtrix_records()
+ pdb_h = pdb_inp.construct_hierarchy()
+ ncs_inp = ncs.input(
+ hierarchy=pdb_h,
+ exclude_selection=None,
+ transform_info=t_i)
+ transform_info = ncs_inp.build_MTRIX_object()
+ assert len(transform_info.r) == 3
+ assert len(transform_info.t) == 3
+ assert transform_info.r[0].is_r3_identity_matrix()
+ assert transform_info.t[0].is_col_zero()
+ sn = [int(x) for x in transform_info.serial_number]
+ assert sn == [1,2,3]
+
+def test_ignoring_mtrix_rec():
+ """
+ Test raising Sorry for MTRIX record when copies already present in file
+ """
+ pdb_inp = pdb.input(source_info=None, lines=test_pdb_9)
+ try:
+ m = multimer(
+ pdb_str=test_pdb_9,
+ round_coordinates=False,
+ reconstruction_type='cau',
+ error_handle=True,eps=1e-2)
+ except Exception as e:
+ assert e.message == "Copies are already present in the file"
+ else:
+ # There must be sorry.
+ assert 0
+
def run_selected_tests():
""" Run selected tests
@@ -904,14 +912,16 @@
2) Comment out unittest.main()
3) Un-comment unittest.TextTestRunner().run(run_selected_tests())
"""
- tests = ['test_proper_biomat_application']
+ tests = ['test_spec_file_format']
suite = unittest.TestSuite(map(TestMultimerReconstruction,tests))
return suite
if __name__=='__main__':
exercise_ss_multiplication()
+ test_identity_tranform_insertion()
+ test_ignoring_mtrix_rec()
# use for individual tests
- unittest.TextTestRunner().run(run_selected_tests())
+ # unittest.TextTestRunner(verbosity=2).run(run_selected_tests())
# Use to run all tests
- # unittest.main(verbosity=0)
+ unittest.main(verbosity=0)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ph...@us...> - 2016-10-24 18:54:19
|
Revision: 25661
http://sourceforge.net/p/cctbx/code/25661
Author: phyy-nx
Date: 2016-10-24 18:54:17 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
XFEL UI
Add captions to unit cell plots that show n images and unit cell means/std deviations
Modified Paths:
--------------
trunk/xfel/ui/components/xfel_gui_init.py
trunk/xfel/ui/components/xfel_gui_plotter.py
Modified: trunk/xfel/ui/components/xfel_gui_init.py
===================================================================
--- trunk/xfel/ui/components/xfel_gui_init.py 2016-10-24 18:53:20 UTC (rev 25660)
+++ trunk/xfel/ui/components/xfel_gui_init.py 2016-10-24 18:54:17 UTC (rev 25661)
@@ -49,7 +49,10 @@
self.mode = tag_selection_mode
self.tags = tags
def __str__(self):
- return ", ".join([t.name for t in self.tags]) + (' (%s)' % self.mode.upper())
+ if len(self.tags) > 1:
+ return ", ".join([t.name for t in self.tags]) + (' (%s)' % self.mode.upper())
+ else:
+ return ", ".join([t.name for t in self.tags])
# ------------------------------- Run Sentinel ------------------------------- #
Modified: trunk/xfel/ui/components/xfel_gui_plotter.py
===================================================================
--- trunk/xfel/ui/components/xfel_gui_plotter.py 2016-10-24 18:53:20 UTC (rev 25660)
+++ trunk/xfel/ui/components/xfel_gui_plotter.py 2016-10-24 18:54:17 UTC (rev 25661)
@@ -147,25 +147,34 @@
plot_ratio = max(min(xsize, ysize)/2.5, 3)
if high_vis:
text_ratio = plot_ratio*6
+ seperator = "\n"
else:
text_ratio = plot_ratio*3
+ seperator = " "
# Initialize figure
fig = plt.figure(figsize=(xsize, ysize))
- gsp = GridSpec(3, 3)
- sub_ab = fig.add_subplot(gsp[0])
- sub_bc = fig.add_subplot(gsp[1])
- sub_ac = fig.add_subplot(gsp[2])
- sub_a = fig.add_subplot(gsp[3])
- sub_b = fig.add_subplot(gsp[4], sharey=sub_a)
- sub_c = fig.add_subplot(gsp[5], sharey=sub_a)
- sub_alpha = fig.add_subplot(gsp[6])
- sub_beta = fig.add_subplot(gsp[7], sharey=sub_alpha)
- sub_gamma = fig.add_subplot(gsp[8], sharey=sub_alpha)
+ gsp = GridSpec(4, 3)
+ legend_sub_a = fig.add_subplot(gsp[0])
+ legend_sub_b = fig.add_subplot(gsp[1])
+ legend_sub_c = fig.add_subplot(gsp[2])
+ sub_ba = fig.add_subplot(gsp[3])
+ sub_cb = fig.add_subplot(gsp[4])
+ sub_ac = fig.add_subplot(gsp[5])
+ sub_a = fig.add_subplot(gsp[6])
+ sub_b = fig.add_subplot(gsp[7], sharey=sub_a)
+ sub_c = fig.add_subplot(gsp[8], sharey=sub_a)
+ sub_alpha = fig.add_subplot(gsp[9])
+ sub_beta = fig.add_subplot(gsp[10], sharey=sub_alpha)
+ sub_gamma = fig.add_subplot(gsp[11], sharey=sub_alpha)
total = 0
abc_hist_ylim = 0
- for info in info_list:
+ legend_sub_a.axis('off')
+ legend_sub_b.axis('off')
+ legend_sub_c.axis('off')
+
+ for legend, info in zip(legend_list, info_list):
if len(info) == 0:
continue
# Extract uc dimensions from info list
@@ -192,48 +201,58 @@
nbins = int(np.sqrt(len(a))) * 2
+ n_str = "N: %d"%len(a)
+ varstr = "%.1f +/- %.1f"%(flex.mean(a),
+ flex.mean_and_variance(a).unweighted_sample_standard_deviation())
+ if len(legend) > 0:
+ a_legend = n_str + " " + legend + seperator + varstr
+ else:
+ a_legend = n_str + varstr
a_hist = sub_a.hist(a, nbins, normed=False,
- alpha=0.75, histtype='stepfilled')
- sub_a.set_xlabel(
- "a-edge (%.2f +/- %.2f $\AA$)" % (flex.mean(a),
- flex.mean_and_variance(a).unweighted_sample_standard_deviation())
- ).set_fontsize(text_ratio)
+ alpha=0.75, histtype='stepfilled', label = a_legend)
+ sub_a.set_xlabel("a-edge (%s $\AA$)"%varstr).set_fontsize(text_ratio)
sub_a.set_ylabel('Number of images').set_fontsize(text_ratio)
+ varstr = "%.1f +/- %.1f"%(flex.mean(b),
+ flex.mean_and_variance(b).unweighted_sample_standard_deviation())
+ if len(legend) > 0:
+ b_legend = legend + seperator + varstr
+ else:
+ b_legend = varstr
b_hist = sub_b.hist(b, nbins, normed=False,
- alpha=0.75, histtype='stepfilled')
- sub_b.set_xlabel(
- "b-edge (%.2f +/- %.2f $\AA$)" % (flex.mean(b),
- flex.mean_and_variance(b).unweighted_sample_standard_deviation())
- ).set_fontsize(text_ratio)
+ alpha=0.75, histtype='stepfilled', label = b_legend)
+ sub_b.set_xlabel("b-edge (%s $\AA$)"%varstr).set_fontsize(text_ratio)
self.plt.setp(sub_b.get_yticklabels(), visible=False)
+ varstr = "%.1f +/- %.1f"%(flex.mean(c),
+ flex.mean_and_variance(c).unweighted_sample_standard_deviation())
+ if len(legend) > 0:
+ c_legend = legend + seperator + varstr
+ else:
+ c_legend = varstr
c_hist = sub_c.hist(c, nbins, normed=False,
- alpha=0.75, histtype='stepfilled')
- sub_c.set_xlabel(
- "c-edge (%.2f +/- %.2f $\AA$)" % (flex.mean(c),
- flex.mean_and_variance(c).unweighted_sample_standard_deviation())
- ).set_fontsize(text_ratio)
+ alpha=0.75, histtype='stepfilled', label = c_legend)
+ sub_c.set_xlabel("c-edge (%s $\AA$)"%varstr).set_fontsize(text_ratio)
self.plt.setp(sub_c.get_yticklabels(), visible=False)
abc_hist_ylim = max(1.2*max([max(h[0]) for h in (a_hist, b_hist, c_hist)]), abc_hist_ylim)
sub_a.set_ylim([0, abc_hist_ylim])
if len(info_list) == 1:
- sub_ab.hist2d(a, b, bins=100)
+ sub_ba.hist2d(b, a, bins=100)
else:
- sub_ab.plot(a.as_numpy_array(), b.as_numpy_array(), '.')
- sub_ab.set_xlabel("a axis").set_fontsize(text_ratio)
- sub_ab.set_ylabel("b axis").set_fontsize(text_ratio)
- # plt.setp(sub_ab.get_yticklabels(), visible=False)
+ sub_ba.plot(b.as_numpy_array(), a.as_numpy_array(), '.')
+ sub_ba.set_xlabel("b axis").set_fontsize(text_ratio)
+ sub_ba.set_ylabel("a axis").set_fontsize(text_ratio)
+ # plt.setp(sub_ba.get_yticklabels(), visible=False)
if len(info_list) == 1:
- sub_bc.hist2d(b, c, bins=100)
+ sub_cb.hist2d(c, b, bins=100)
else:
- sub_bc.plot(b.as_numpy_array(), c.as_numpy_array(), '.')
- sub_bc.set_xlabel("b axis").set_fontsize(text_ratio)
- sub_bc.set_ylabel("c axis").set_fontsize(text_ratio)
- # plt.setp(sub_bc.get_yticklabels(), visible=False)
+ sub_cb.plot(c.as_numpy_array(), b.as_numpy_array(), '.')
+ sub_cb.set_xlabel("c axis").set_fontsize(text_ratio)
+ sub_cb.set_ylabel("b axis").set_fontsize(text_ratio)
+ # plt.setp(sub_cb.get_yticklabels(), visible=False)
if len(info_list) == 1:
sub_ac.hist2d(a, c, bins=100)
@@ -241,12 +260,12 @@
sub_ac.plot(a.as_numpy_array(), c.as_numpy_array(), '.')
sub_ac.set_xlabel("a axis").set_fontsize(text_ratio)
sub_ac.set_ylabel("c axis").set_fontsize(text_ratio)
- # plt.setp(sub_bc.get_yticklabels(), visible=False)
+ # plt.setp(sub_cb.get_yticklabels(), visible=False)
for ax in (sub_a, sub_b, sub_c, sub_alpha, sub_beta, sub_gamma):
ax.tick_params(axis='both', which='both', left='off', right='off')
ax.set_yticklabels([])
- for ax in (sub_ab, sub_bc, sub_ac):
+ for ax in (sub_ba, sub_cb, sub_ac):
ax.tick_params(axis='both', which='both', bottom='off', top='off', left='off', right='off')
ax.set_xticklabels([])
ax.set_yticklabels([])
@@ -278,10 +297,10 @@
sub_b.xaxis.get_major_ticks()[-1].label1.set_visible(False)
sub_c.xaxis.get_major_ticks()[0].label1.set_visible(False)
sub_c.xaxis.get_major_ticks()[-1].label1.set_visible(False)
- sub_ab.xaxis.get_major_ticks()[0].label1.set_visible(False)
- sub_ab.xaxis.get_major_ticks()[-1].label1.set_visible(False)
- sub_bc.xaxis.get_major_ticks()[0].label1.set_visible(False)
- sub_bc.xaxis.get_major_ticks()[-1].label1.set_visible(False)
+ sub_ba.xaxis.get_major_ticks()[0].label1.set_visible(False)
+ sub_ba.xaxis.get_major_ticks()[-1].label1.set_visible(False)
+ sub_cb.xaxis.get_major_ticks()[0].label1.set_visible(False)
+ sub_cb.xaxis.get_major_ticks()[-1].label1.set_visible(False)
sub_ac.xaxis.get_major_ticks()[0].label1.set_visible(False)
sub_ac.xaxis.get_major_ticks()[-1].label1.set_visible(False)
sub_beta.xaxis.get_major_ticks()[0].label1.set_visible(False)
@@ -289,6 +308,13 @@
sub_gamma.xaxis.get_major_ticks()[0].label1.set_visible(False)
sub_gamma.xaxis.get_major_ticks()[-1].label1.set_visible(False)
+ h, l = sub_a.get_legend_handles_labels()
+ legend_sub_a.legend(h, l, fontsize=text_ratio)
+ h, l = sub_b.get_legend_handles_labels()
+ legend_sub_b.legend(h, l, fontsize=text_ratio)
+ h, l = sub_c.get_legend_handles_labels()
+ legend_sub_c.legend(h, l, fontsize=text_ratio)
+
# if len(legend_list) > 0:
# import matplotlib.patches as mpatches
# rgb_alphas = [a_hist[2][i] for i in range(len(a_hist[2]))]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ole...@us...> - 2016-10-24 18:53:22
|
Revision: 25660
http://sourceforge.net/p/cctbx/code/25660
Author: olegsobolev
Date: 2016-10-24 18:53:20 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
Start models count from 1 in all_states in real_space_refine to accomodate Coot.
Modified Paths:
--------------
trunk/mmtbx/refinement/real_space/__init__.py
trunk/mmtbx/utils/__init__.py
Modified: trunk/mmtbx/refinement/real_space/__init__.py
===================================================================
--- trunk/mmtbx/refinement/real_space/__init__.py 2016-10-24 18:52:28 UTC (rev 25659)
+++ trunk/mmtbx/refinement/real_space/__init__.py 2016-10-24 18:53:20 UTC (rev 25660)
@@ -238,7 +238,8 @@
self.xray_structure_start = xray_structure.deep_copy_scatterers()
self.states_collector = mmtbx.utils.states(
pdb_hierarchy = self.pdb_hierarchy,
- xray_structure = self.xray_structure)
+ xray_structure = self.xray_structure,
+ counter = 1)
self.states_collector.add(sites_cart = self.xray_structure.sites_cart())
self.rotamer_manager = RotamerEval()
self.assert_pdb_hierarchy_xray_structure_sync()
Modified: trunk/mmtbx/utils/__init__.py
===================================================================
--- trunk/mmtbx/utils/__init__.py 2016-10-24 18:52:28 UTC (rev 25659)
+++ trunk/mmtbx/utils/__init__.py 2016-10-24 18:53:20 UTC (rev 25660)
@@ -3363,9 +3363,9 @@
return result
class states(object):
- def __init__(self, pdb_hierarchy, xray_structure=None):
+ def __init__(self, pdb_hierarchy, xray_structure=None, counter=0):
adopt_init_args(self, locals())
- self.counter = 0
+ self.counter = counter
self.root = iotbx.pdb.hierarchy.root()
self.sites_carts = []
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ole...@us...> - 2016-10-24 18:52:30
|
Revision: 25659
http://sourceforge.net/p/cctbx/code/25659
Author: olegsobolev
Date: 2016-10-24 18:52:28 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
Make checks the same for MTRIX and BIOMT records
Modified Paths:
--------------
trunk/iotbx/pdb/multimer_reconstruction.py
Modified: trunk/iotbx/pdb/multimer_reconstruction.py
===================================================================
--- trunk/iotbx/pdb/multimer_reconstruction.py 2016-10-24 16:13:23 UTC (rev 25658)
+++ trunk/iotbx/pdb/multimer_reconstruction.py 2016-10-24 18:52:28 UTC (rev 25659)
@@ -81,18 +81,18 @@
transform_info = pdb_inp.process_mtrix_records(
error_handle=error_handle,
eps=eps)
- if (transform_info.as_pdb_string() == '' or
- not ncs_only(transform_info) or
- transform_info.contains_only_identity_matrices()):
- transform_info = None
- else:
- transform_info = insure_identity_is_in_transform_info(transform_info)
self.transform_type = 'crystall_asymmetric_unit'
else:
raise Sorry('Sorry, wrong reconstruction type is given \n' + \
'Reconstruction type can be: \n' + \
"'ba': biological assembly \n" + \
"'cau': crystallographic asymmetric unit \n")
+ if (transform_info.as_pdb_string() == '' or
+ not ncs_only(transform_info) or
+ transform_info.contains_only_identity_matrices()):
+ transform_info = None
+ else:
+ transform_info = insure_identity_is_in_transform_info(transform_info)
if len(pdb_obj.hierarchy.models()) > 1:
raise Sorry('Sorry, this feature currently supports on single models ' +
'hierarchies')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2016-10-24 16:13:25
|
Revision: 25658
http://sourceforge.net/p/cctbx/code/25658
Author: rjgildea
Date: 2016-10-24 16:13:23 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
get goniometer from imageset not rely on that in format class
Modified Paths:
--------------
trunk/dxtbx/imageset.py
trunk/rstbx/slip_viewer/frame.py
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-24 14:43:22 UTC (rev 25657)
+++ trunk/dxtbx/imageset.py 2016-10-24 16:13:23 UTC (rev 25658)
@@ -592,6 +592,8 @@
'''
# Check for a dynamic mask
+ if goniometer is None:
+ goniometer = self.get_goniometer(index)
dyn_mask = self.reader().get_format(index).get_mask(goniometer=goniometer)
if dyn_mask is None:
Modified: trunk/rstbx/slip_viewer/frame.py
===================================================================
--- trunk/rstbx/slip_viewer/frame.py 2016-10-24 14:43:22 UTC (rev 25657)
+++ trunk/rstbx/slip_viewer/frame.py 2016-10-24 16:13:23 UTC (rev 25658)
@@ -29,8 +29,8 @@
def get_detector(self): return self.image_set.get_detector()
def get_scan(self): return self.image_set.get_scan()
def get_beam(self): return self.image_set.get_beam()
- def get_mask(self, goniometer=None):
- return self.image_set.get_mask(self.index, goniometer=goniometer)
+ def get_mask(self):
+ return self.image_set.get_mask(self.index)
def get_raw_data(self):
if self._raw_data is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2016-10-24 14:43:25
|
Revision: 25657
http://sourceforge.net/p/cctbx/code/25657
Author: rjgildea
Date: 2016-10-24 14:43:22 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
hack to allow goniometer to be overridden when generating a dynamic shadowing mask
Modified Paths:
--------------
trunk/dxtbx/imageset.py
trunk/rstbx/slip_viewer/frame.py
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-24 13:34:42 UTC (rev 25656)
+++ trunk/dxtbx/imageset.py 2016-10-24 14:43:22 UTC (rev 25657)
@@ -584,7 +584,7 @@
return pedestal
return self.external_lookup.pedestal.data
- def get_mask(self, index):
+ def get_mask(self, index, goniometer=None):
'''
Get the mask at the given index.
Queries a format object for a dynamic mask if it exists.
@@ -592,7 +592,7 @@
'''
# Check for a dynamic mask
- dyn_mask = self.reader().get_format(index).get_mask()
+ dyn_mask = self.reader().get_format(index).get_mask(goniometer=goniometer)
if dyn_mask is None:
# Get the image and detector
Modified: trunk/rstbx/slip_viewer/frame.py
===================================================================
--- trunk/rstbx/slip_viewer/frame.py 2016-10-24 13:34:42 UTC (rev 25656)
+++ trunk/rstbx/slip_viewer/frame.py 2016-10-24 14:43:22 UTC (rev 25657)
@@ -29,8 +29,8 @@
def get_detector(self): return self.image_set.get_detector()
def get_scan(self): return self.image_set.get_scan()
def get_beam(self): return self.image_set.get_beam()
- def get_mask(self):
- return self.image_set.get_mask(self.index)
+ def get_mask(self, goniometer=None):
+ return self.image_set.get_mask(self.index, goniometer=goniometer)
def get_raw_data(self):
if self._raw_data is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2016-10-24 13:34:44
|
Revision: 25656
http://sourceforge.net/p/cctbx/code/25656
Author: rjgildea
Date: 2016-10-24 13:34:42 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
support for multi_panel=False format class kwarg
Modified Paths:
--------------
trunk/dxtbx/datablock.py
trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py
trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py
trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN119.py
trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py
Modified: trunk/dxtbx/datablock.py
===================================================================
--- trunk/dxtbx/datablock.py 2016-10-24 10:48:37 UTC (rev 25655)
+++ trunk/dxtbx/datablock.py 2016-10-24 13:34:42 UTC (rev 25656)
@@ -477,7 +477,8 @@
compare_beam,
compare_detector,
compare_goniometer,
- scan_tolerance)
+ scan_tolerance,
+ format_kwargs=format_kwargs)
for group, items in groupby(records, lambda r: r.group):
items = list(items)
imageset = self._create_multi_file_imageset(fmt, list(items),
@@ -490,7 +491,8 @@
compare_beam=None,
compare_detector=None,
compare_goniometer=None,
- scan_tolerance=None):
+ scan_tolerance=None,
+ format_kwargs=None):
''' Extract the file meta data in order to sort them. '''
from dxtbx.sweep_filenames import template_regex
import operator
@@ -502,6 +504,8 @@
compare_detector = operator.__eq__
if compare_goniometer is None:
compare_goniometer = operator.__eq__
+ if format_kwargs is None:
+ format_kwargs = {}
class Record(object):
def __init__(self, beam=None, detector=None, goniometer=None, scan=None,
@@ -521,7 +525,7 @@
for filename in filenames:
# Read the image
- fmt = format_class(filename)
+ fmt = format_class(filename, **format_kwargs)
# Get the meta data from the format
try: b = fmt.get_beam()
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py 2016-10-24 10:48:37 UTC (rev 25655)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py 2016-10-24 13:34:42 UTC (rev 25656)
@@ -15,17 +15,6 @@
__mask = None
-# if group_rows == True, then interpret data as 24 panels, where each row
-# of 5 panels is grouped as one "panel"
-# elif group_rows == False, then interpret data as 120 panels,
-# 24 rows * 5 columns - bodge through ENV variable in 1st cut...
-
-import os
-if 'P12M_120_PANEL' in os.environ:
- group_rows = False
-else:
- group_rows = True
-
def read_mask():
global __mask
if not __mask:
@@ -58,11 +47,17 @@
assert(self.understand(image_file))
+ # if multi_panel == False, then interpret data as 24 panels, where each row
+ # of 5 panels is grouped as one "panel"
+ # elif multi_panel == True, then interpret data as 120 panels,
+ # 24 rows * 5 columns
+ self._dynamic_shadowing = kwargs.get('dynamic_shadowing', False)
+ self._multi_panel = kwargs.get('multi_panel', False)
FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
self._raw_data = None
- self._dynamic_shadowing = kwargs.get('dynamic_shadowing', False)
+
return
def _detector(self):
@@ -125,7 +120,7 @@
row_origin = 250.0 * normal - off_x * fast - 16.8 * slow
- if group_rows:
+ if not self._multi_panel:
xmin, xmax = 0, 2463
# OK two calls to add_panel here for detector like things => two
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py 2016-10-24 10:48:37 UTC (rev 25655)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py 2016-10-24 13:34:42 UTC (rev 25656)
@@ -15,10 +15,6 @@
from dxtbx.format.FormatPilatusHelpers import determine_pilatus_mask
import os
-if 'P6M_60_PANEL' in os.environ:
- single_panel = False
-else:
- single_panel = True
if 'DXTBX_ENABLE_SMARGON' in os.environ:
enable_smargon = True
@@ -48,10 +44,11 @@
assert(self.understand(image_file))
+ self._dynamic_shadowing = kwargs.get('dynamic_shadowing', False)
+ self._multi_panel = kwargs.get('multi_panel', False)
FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
self._raw_data = None
- self._dynamic_shadowing = kwargs.get('dynamic_shadowing', False)
return
@@ -186,7 +183,7 @@
pixel_y *= 1000.0
distance *= 1000.0
- if single_panel:
+ if not self._multi_panel:
detector = self._detector_factory.simple(
'PAD', distance, (beam_x * pixel_x, beam_y * pixel_y),
'+x', '-y', (pixel_x, pixel_y), (nx, ny), (underload, overload), [],
@@ -362,23 +359,21 @@
return pixel_values
- if not single_panel:
+ def get_raw_data(self):
+ if not self._multi_panel:
+ return super(FormatCBFMiniPilatusDLS6MSN100, self).get_raw_data()
- def get_raw_data(self):
- if self._raw_data is None:
- raw_data = self.read_cbf_image(self._image_file)
+ if self._raw_data is None:
+ raw_data = self.read_cbf_image(self._image_file)
+ self._raw_data = []
+ d = self.get_detector()
+ for panel in d:
+ xmin, ymin, xmax, ymax = self.coords[panel.get_name()]
+ self._raw_data.append(raw_data[ymin:ymax,xmin:xmax])
+ self._raw_data = tuple(self._raw_data)
+ return self._raw_data
- self._raw_data = []
- d = self.get_detector()
-
- for panel in d:
- xmin, ymin, xmax, ymax = self.coords[panel.get_name()]
- self._raw_data.append(raw_data[ymin:ymax,xmin:xmax])
-
- return tuple(self._raw_data)
-
-
if enable_smargon:
from dials.util.masking import GoniometerShadowMaskGenerator
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN119.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN119.py 2016-10-24 10:48:37 UTC (rev 25655)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN119.py 2016-10-24 13:34:42 UTC (rev 25656)
@@ -12,12 +12,6 @@
from dxtbx.format.FormatCBFMiniPilatus import FormatCBFMiniPilatus
-import os
-if 'P6M_60_PANEL' in os.environ:
- single_panel = False
-else:
- single_panel = True
-
def read_cbf_image(cbf_image):
from cbflib_adaptbx import uncompress
import binascii
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py 2016-10-24 10:48:37 UTC (rev 25655)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN126.py 2016-10-24 13:34:42 UTC (rev 25656)
@@ -14,11 +14,6 @@
from dxtbx.model import ParallaxCorrectedPxMmStrategy
from dxtbx.format.FormatPilatusHelpers import determine_pilatus_mask
-import os
-if 'P6M_60_PANEL' in os.environ:
- single_panel = False
-else:
- single_panel = True
class FormatCBFMiniPilatusDLS6MSN126(FormatCBFMiniPilatus):
'''A class for reading mini CBF format Pilatus images for 6M SN 126 @ DLS.'''
@@ -43,10 +38,10 @@
assert(self.understand(image_file))
+ self._raw_data = None
+ self._multi_panel = kwargs.get('multi_panel', False)
FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
- self._raw_data = None
-
return
def _goniometer(self):
@@ -175,7 +170,7 @@
pixel_y *= 1000.0
distance *= 1000.0
- if single_panel:
+ if not self._multi_panel:
detector = self._detector_factory.simple(
'PAD', distance, (beam_x * pixel_x, beam_y * pixel_y),
'+x', '-y', (pixel_x, pixel_y), (nx, ny), (underload, overload), [],
@@ -284,22 +279,21 @@
return pixel_values
- if not single_panel:
+ def get_raw_data(self):
+ if not self._multi_panel:
+ return super(FormatCBFMiniPilatusDLS6MSN100, self).get_raw_data()
- def get_raw_data(self):
- if self._raw_data is None:
- raw_data = self.read_cbf_image(self._image_file)
+ if self._raw_data is None:
+ raw_data = self.read_cbf_image(self._image_file)
+ self._raw_data = []
+ d = self.get_detector()
+ for panel in d:
+ xmin, ymin, xmax, ymax = self.coords[panel.get_name()]
+ self._raw_data.append(raw_data[ymin:ymax,xmin:xmax])
+ self._raw_data.append(raw_data[ymin:ymax,xmin:xmax])
+ self._raw_data = tuple(self._raw_data)
+ return self._raw_data
- self._raw_data = []
-
- d = self.get_detector()
-
- for panel in d:
- xmin, ymin, xmax, ymax = self.coords[panel.get_name()]
- self._raw_data.append(raw_data[ymin:ymax,xmin:xmax])
-
- return tuple(self._raw_data)
-
if __name__ == '__main__':
import sys
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rjg...@us...> - 2016-10-24 10:48:40
|
Revision: 25655
http://sourceforge.net/p/cctbx/code/25655
Author: rjgildea
Date: 2016-10-24 10:48:37 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
use new format class kwargs mechanism to set dynamic shadowing at format class level
Modified Paths:
--------------
trunk/dxtbx/format/Format.py
trunk/dxtbx/format/FormatCBFFullPilatus.py
trunk/dxtbx/format/FormatCBFMiniEigerPF.py
trunk/dxtbx/format/FormatCBFMiniPilatus.py
trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py
trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py
trunk/dxtbx/format/FormatHDFEigerNearlyNexus.py
trunk/dxtbx/format/FormatNexus.py
trunk/dxtbx/format/FormatPYunspecified.py
trunk/dxtbx/format/FormatSMVADSC.py
trunk/dxtbx/imageset.py
trunk/rstbx/slip_viewer/frame.py
Modified: trunk/dxtbx/format/Format.py
===================================================================
--- trunk/dxtbx/format/Format.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/Format.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -263,7 +263,7 @@
long as the result is an scan.'''
return None
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, goniometer=None):
'''Overload this method to provide dynamic masks to be used during
spotfinding or integration.'''
Modified: trunk/dxtbx/format/FormatCBFFullPilatus.py
===================================================================
--- trunk/dxtbx/format/FormatCBFFullPilatus.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatCBFFullPilatus.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -148,7 +148,7 @@
return self._raw_data
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, goniometer=None):
from scitbx.array_family import flex
detector = self.get_detector()
mask = [flex.bool(flex.grid(reversed(p.get_image_size())), True)
Modified: trunk/dxtbx/format/FormatCBFMiniEigerPF.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniEigerPF.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatCBFMiniEigerPF.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -223,7 +223,7 @@
return self._raw_data
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, goniometer=None):
from scitbx.array_family import flex
detector = self.get_detector()
mask = [flex.bool(flex.grid(reversed(p.get_image_size())), True) for p in detector]
Modified: trunk/dxtbx/format/FormatCBFMiniPilatus.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatus.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatCBFMiniPilatus.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -205,7 +205,7 @@
return self._raw_data
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, goniometer=None):
from scitbx.array_family import flex
detector = self.get_detector()
mask = [flex.bool(flex.grid(reversed(p.get_image_size())), True)
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS12M.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -61,6 +61,7 @@
FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
self._raw_data = None
+ self._dynamic_shadowing = kwargs.get('dynamic_shadowing', False)
return
@@ -313,15 +314,16 @@
return GoniometerShadowMaskGenerator(
goniometer, coords, flex.size_t(len(coords), 1))
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
- gonio_masker = self.get_goniometer_shadow_masker(goniometer=goniometer)
- scan = self.get_scan()
- detector = self.get_detector()
+ def get_mask(self, goniometer=None):
mask = super(FormatCBFMiniPilatusDLS12M, self).get_mask()
- shadow_mask = gonio_masker.get_mask(detector, scan.get_oscillation()[0])
- assert len(mask) == len(shadow_mask)
- for m, sm in zip(mask, shadow_mask):
- m &= sm
+ if self._dynamic_shadowing:
+ gonio_masker = self.get_goniometer_shadow_masker(goniometer=goniometer)
+ scan = self.get_scan()
+ detector = self.get_detector()
+ shadow_mask = gonio_masker.get_mask(detector, scan.get_oscillation()[0])
+ assert len(mask) == len(shadow_mask)
+ for m, sm in zip(mask, shadow_mask):
+ m &= sm
return mask
Modified: trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py
===================================================================
--- trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatCBFMiniPilatusDLS6MSN100.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -51,6 +51,7 @@
FormatCBFMiniPilatus.__init__(self, image_file, **kwargs)
self._raw_data = None
+ self._dynamic_shadowing = kwargs.get('dynamic_shadowing', False)
return
@@ -288,9 +289,9 @@
return GoniometerShadowMaskGenerator(
goniometer, coords, flex.size_t(len(coords), 0))
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, goniometer=None):
mask = super(FormatCBFMiniPilatusDLS6MSN100, self).get_mask()
- if goniometer_shadow_mask:
+ if self._dynamic_shadowing:
gonio_masker = self.get_goniometer_shadow_masker(goniometer=goniometer)
scan = self.get_scan()
detector = self.get_detector()
Modified: trunk/dxtbx/format/FormatHDFEigerNearlyNexus.py
===================================================================
--- trunk/dxtbx/format/FormatHDFEigerNearlyNexus.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatHDFEigerNearlyNexus.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -343,7 +343,7 @@
def get_raw_data(self, index):
return self._raw_data[index]
- def get_mask(self, index=None, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, index=None, goniometer=None):
return self._mask
def get_num_images(self):
Modified: trunk/dxtbx/format/FormatNexus.py
===================================================================
--- trunk/dxtbx/format/FormatNexus.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatNexus.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -109,7 +109,7 @@
def get_raw_data(self, index):
return self._raw_data[index]
- def get_mask(self, index=None, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, index=None, goniometer=None):
return self._mask
def get_num_images(self):
Modified: trunk/dxtbx/format/FormatPYunspecified.py
===================================================================
--- trunk/dxtbx/format/FormatPYunspecified.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatPYunspecified.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -143,7 +143,7 @@
epochs = {1:self._timesec}
)
- def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
+ def get_mask(self, goniometer=None):
'''Creates a mask merging untrusted pixels with active areas.'''
from scitbx.array_family import flex
detector_base = self.detectorbase
Modified: trunk/dxtbx/format/FormatSMVADSC.py
===================================================================
--- trunk/dxtbx/format/FormatSMVADSC.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/format/FormatSMVADSC.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -154,40 +154,6 @@
return raw_data
- #def get_mask(self, goniometer_shadow_mask=False, goniometer=None):
- #from scitbx.array_family import flex
- #from iotbx.detectors import image_divider
-
- #data = self.get_raw_data()
- #nullvalue = self.detectorbase.vendor_specific_null_value
-
- ## get effective active area coordinates
- #ID = image_divider(data=data, nullvalue=nullvalue)
- #n_modules = ID.module_count()
-
- ## set the mask to the same dimensions as the data
- #mask = flex.bool(flex.grid(data.focus()), False)
-
- ## set active areas to True so they are not masked
- #for i in range(n_modules):
- #interval_fast = ID.tile_fast_interval(i)
- #interval_slow = ID.tile_slow_interval(i)
- ##print interval_slow.first, interval_slow.last
- ##print interval_fast.first, interval_fast.last
- #mask_tile = flex.bool(
- #flex.grid(interval_slow.last-interval_slow.first,
- #interval_fast.last-interval_fast.first), True)
- #mask.matrix_paste_block_in_place(
- #mask_tile, interval_slow.first, interval_fast.first)
-
- ## create untrusted pixel mask
- #detector = self.get_detector()
- #assert len(detector) == 1
- #trusted_mask = detector[0].get_trusted_range_mask(data)
-
- ## returns merged untrusted pixels and active areas
- #return (mask & trusted_mask,)
-
if __name__ == '__main__':
import sys
Modified: trunk/dxtbx/imageset.py
===================================================================
--- trunk/dxtbx/imageset.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/dxtbx/imageset.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -584,7 +584,7 @@
return pedestal
return self.external_lookup.pedestal.data
- def get_mask(self, index, goniometer_shadow_mask=False):
+ def get_mask(self, index):
'''
Get the mask at the given index.
Queries a format object for a dynamic mask if it exists.
@@ -592,8 +592,7 @@
'''
# Check for a dynamic mask
- dyn_mask = self.reader().get_format(index).get_mask(
- goniometer_shadow_mask=goniometer_shadow_mask)
+ dyn_mask = self.reader().get_format(index).get_mask()
if dyn_mask is None:
# Get the image and detector
Modified: trunk/rstbx/slip_viewer/frame.py
===================================================================
--- trunk/rstbx/slip_viewer/frame.py 2016-10-24 09:40:41 UTC (rev 25654)
+++ trunk/rstbx/slip_viewer/frame.py 2016-10-24 10:48:37 UTC (rev 25655)
@@ -29,9 +29,8 @@
def get_detector(self): return self.image_set.get_detector()
def get_scan(self): return self.image_set.get_scan()
def get_beam(self): return self.image_set.get_beam()
- def get_mask(self, goniometer_shadow_mask=False):
- return self.image_set.get_mask(
- self.index, goniometer_shadow_mask=goniometer_shadow_mask)
+ def get_mask(self):
+ return self.image_set.get_mask(self.index)
def get_raw_data(self):
if self._raw_data is None:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mge...@us...> - 2016-10-24 09:40:42
|
Revision: 25654
http://sourceforge.net/p/cctbx/code/25654
Author: mgerstel
Date: 2016-10-24 09:40:41 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
Add DLS I19-2 detector information
Added Paths:
-----------
trunk/dxtbx/data/beamline_defs/PILATUS_300K_S_N_3_0104_Diamond.py
Added: trunk/dxtbx/data/beamline_defs/PILATUS_300K_S_N_3_0104_Diamond.py
===================================================================
--- trunk/dxtbx/data/beamline_defs/PILATUS_300K_S_N_3_0104_Diamond.py (rev 0)
+++ trunk/dxtbx/data/beamline_defs/PILATUS_300K_S_N_3_0104_Diamond.py 2016-10-24 09:40:41 UTC (rev 25654)
@@ -0,0 +1,45 @@
+from __future__ import division
+import dxtbx.data.beamline_defs
+
+class get_definition(dxtbx.data.beamline_defs.template):
+ def __init__(self, timestamp=None, **kwargs):
+ self._timestamp = timestamp
+
+ def CIF_block(self):
+ '''Interface function to generate a CIF block for this detector.'''
+ return self._identify_time()(mmcif=False)
+
+ def mmCIF_block(self):
+ '''Interface function to generate an mmCIF block for this detector.'''
+ return self._identify_time()(mmcif=True)
+
+ def _identify_time(self):
+ '''Detector has always been on I19.'''
+ return self._at_I19
+
+ def _base(self, mmcif=False):
+ '''Generates
+ 1. a CIF/mmCIF block that contains information that
+ is always true about the detector.
+ 2. a lookup function for CIF/mmCIF strings.'''
+ # prepare string lookup table
+ l = self._lookup(mmcif)
+
+ import iotbx.cif.model
+ b = iotbx.cif.model.block()
+ b[l('df.detector')] = 'Photon counting pixel array'
+ b[l('df.rad.type')] = 'Synchrotron'
+
+ return b, l
+
+ def _at_I19(self, mmcif=False):
+ b, l = self._base(mmcif)
+
+# b[l('df.m.dev')] = 'Fixed \\c 3-circle diffractometer'
+# b[l('df.m.dev_type')] = 'Fluid Film Devices'
+ b[l('df.m.method')] = 'shutterless scans'
+# b[l('df.m.spec_supp')] = 'MiTeGen MicroMount'
+ b[l('df.rad.source')] = 'Diamond Light Source Beamline I19-2'
+ b[l('df.rad.mono')] = 'Silicon 111'
+
+ return b
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mge...@us...> - 2016-10-24 09:27:35
|
Revision: 25653
http://sourceforge.net/p/cctbx/code/25653
Author: mgerstel
Date: 2016-10-24 09:27:33 +0000 (Mon, 24 Oct 2016)
Log Message:
-----------
update I19-1 detector infos
Modified Paths:
--------------
trunk/dxtbx/data/beamline_defs/PILATUS_2M_S_N_24_0107_Diamond.py
Modified: trunk/dxtbx/data/beamline_defs/PILATUS_2M_S_N_24_0107_Diamond.py
===================================================================
--- trunk/dxtbx/data/beamline_defs/PILATUS_2M_S_N_24_0107_Diamond.py 2016-10-23 23:43:17 UTC (rev 25652)
+++ trunk/dxtbx/data/beamline_defs/PILATUS_2M_S_N_24_0107_Diamond.py 2016-10-24 09:27:33 UTC (rev 25653)
@@ -43,9 +43,9 @@
b[l('df.m.dev')] = 'Fixed \\c 3-circle diffractometer'
b[l('df.m.dev_type')] = 'Fluid Film Devices'
- b[l('df.m.method')] = '\\f rotation with 0.1 degree frames'
+ b[l('df.m.method')] = 'shutterless scans'
b[l('df.m.spec_supp')] = 'MiTeGen MicroMount'
- b[l('df.rad.source')] = 'Diamond Light Source Beamline I19'
+ b[l('df.rad.source')] = 'Diamond Light Source Beamline I19-1'
b[l('df.rad.mono')] = 'Silicon 111'
return b
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ph...@us...> - 2016-10-23 23:43:19
|
Revision: 25652
http://sourceforge.net/p/cctbx/code/25652
Author: phyy-nx
Date: 2016-10-23 23:43:17 +0000 (Sun, 23 Oct 2016)
Log Message:
-----------
XFEL UI
Avoid calling a wxPython's GetSize method in a thread. Should be more thread-safe.
Modified Paths:
--------------
trunk/xfel/ui/components/xfel_gui_init.py
Modified: trunk/xfel/ui/components/xfel_gui_init.py
===================================================================
--- trunk/xfel/ui/components/xfel_gui_init.py 2016-10-23 22:44:16 UTC (rev 25651)
+++ trunk/xfel/ui/components/xfel_gui_init.py 2016-10-23 23:43:17 UTC (rev 25652)
@@ -459,7 +459,7 @@
def plot_stats_static(self):
from xfel.ui.components.run_stats_plotter import plot_multirun_stats
self.refresh_stats()
- sizex, sizey = self.parent.run_window.runstats_tab.runstats_panel.GetSize()
+ sizex, sizey = self.parent.run_window.runstats_tab.runstats_panelsize
self.parent.run_window.runstats_tab.png = plot_multirun_stats(
self.stats, self.run_numbers,
d_min=self.parent.run_window.runstats_tab.d_min,
@@ -524,7 +524,7 @@
self.parent.run_window.unitcell_light.change_status('idle')
trial = self.parent.run_window.unitcell_tab.trial
tag_sets = self.parent.run_window.unitcell_tab.tag_sets
- sizex, sizey = self.parent.run_window.unitcell_tab.unit_cell_panel.GetSize()
+ sizex, sizey = self.parent.run_window.unitcell_tab.unit_cell_panelsize
info_list = []
legend_list = []
@@ -1675,6 +1675,7 @@
self.should_have_indexed_image_paths = None
self.runstats_panel = wx.Panel(self, size=(900, 120))
+ self.runstats_panelsize = self.runstats_panel.GetSize()
self.runstats_box = wx.StaticBox(self.runstats_panel, label='Run Statistics')
self.runstats_sizer = wx.StaticBoxSizer(self.runstats_box, wx.ALL | wx.EXPAND)
self.runstats_panel.SetSizer(self.runstats_sizer)
@@ -1766,7 +1767,11 @@
self.Bind(wx.EVT_TEXT_ENTER, self.onHitCutoff, self.n_strong_cutoff.n_strong)
self.Bind(wx.EVT_CHECKLISTBOX, self.onRunChoice, self.run_numbers.ctr)
self.Bind(EVT_RUNSTATS_REFRESH, self.onRefresh)
+ self.Bind(wx.EVT_SIZE, self.OnSize)
+ def OnSize(self, e):
+ self.runstats_panelsize = self.runstats_panel.GetSize()
+ e.Skip()
def onTrialChoice(self, e):
trial_idx = self.trial_number.ctr.GetSelection()
@@ -1999,6 +2004,7 @@
self.selection_columns_sizer.Add(self.remove_sele_sizer, flag=wx.ALL | wx.EXPAND, border=10)
self.unit_cell_panel = wx.Panel(self, size=(200, 120))
+ self.unit_cell_panelsize = self.unit_cell_panel.GetSize()
self.unit_cell_box = wx.StaticBox(self.unit_cell_panel, label='Unit cell analysis')
self.unit_cell_sizer = wx.StaticBoxSizer(self.unit_cell_box, wx.VERTICAL | wx.EXPAND)
self.unit_cell_panel.SetSizer(self.unit_cell_sizer)
@@ -2020,7 +2026,12 @@
self.Bind(wx.EVT_BUTTON, self.onRemoveTagSet, self.remove_sele_button)
self.Bind(wx.EVT_BUTTON, self.onResetTagSets, self.reset_sele_button)
self.Bind(EVT_UNITCELL_REFRESH, self.onRefresh)
+ self.Bind(wx.EVT_SIZE, self.OnSize)
+ def OnSize(self, e):
+ self.unit_cell_panelsize = self.unit_cell_panel.GetSize()
+ e.Skip()
+
def find_trials(self):
all_db_trials = [str(i.trial) for i in self.main.db.get_all_trials()]
new_trials = [i for i in all_db_trials if i not in self.all_trials]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|