Closed ElkeDeZitter closed 9 months ago
Hi @ElkeDeZitter,
Apologies for the late reply. It is a long, holiday weekend here.
Careless expects unmerged data and so it is looking for a column with the "BATCH" data type. This is typically used to record what image a reflection was observed on in an unmerged dataset. There is some nuance to what "BATCH" actually means in the case of rotation-method data, but that's the idea at least.
If you can just add a BATCH column to your MTZ which puts all the reflections on the same image, careless will be appeased. I was able to get careless to scale merged data by pre-processing the mtz file with the following script:
import reciprocalspaceship as rs
anomalous=True
mtz_in = 'hewl_0.mtz'
mtz_out = 'hewl_0_batch.mtz'
ds = rs.read_mtz(mtz_in)
if anomalous:
ds = ds.stack_anomalous()
ds = ds.dropna()
ds['BATCH'] = 1
ds = ds.infer_mtz_dtypes()
ds.merged = False
ds.write_mtz(mtz_out)
You need to set the anomalous
variable to match your particular use case. MTZs with anomalous data are usually stored in a two column format with the miller index in the positive half of the reciprocal asymmetric unit. This sort of MTZ with (+) and (-) columns need to be handled differently from those without.
Let me know if this makes sense. I am happy to have another look tomorrow.
Hi @kmdalton , That seems to do the trick! Thank you very much.
Awesome! I'll close this issue, but I'd love to follow up on this idea later.
Hi,
I would like to see how careless performs to scale merged data (what I usually would do with scaleit). I know the careless help message explicitly states that the input mtz file(s) should contain unmerged reflections. Nevertheless, I was wondering if it was possible.
I tried to run careless as follows:
My mtz files only contain Miller indices and IMEAN and SIGIMEAN columns, which is also confirmed by rs.mtzdump:
and after calling the read_mtz function in ipython:
Upon launching careless as described above, I get a large error message:
My understanding is that Careless can't find a column that it finds suitable for merging since the data is already merged. Is that correct? Would there be an easy way to circumvent this or should I stay with scaleit for these kind of scaling problems?
Thanks!