Out of curiosity, will this change be accompanied with specifying particle shifts in angstroms?
Sent from my iPhone
> On Feb 19, 2016, at 12:02 AM, Sjors Scheres <[log in to unmask]> wrote:
>
> Hi Jose-Miguel,
> You should either pass rlnMagnification AND rlnDetectorPixelSize in the
> input STAR file (in which case --angpix will be ignored) OR you could pass
> --angpix. I'm aware this is slightly double: we only ever are interested
> in the angpix and I use 2 values to pass it on. That's an unfortunate
> choice early on, which for the sake of backwards compatibility has
> remained in RELION. In the next version, unbinning will be dealt with much
> more conveniently, so manual modification of STAR files (like Chris just
> described) will no longer be necessary.
> HTH,
> Sjors
>
>> Dear Sjors,
>>
>> I just want to confirm the effect of passing only one of MAGNIFICATION or
>> DETECTOR_PIXEL_SIZE. I have seen in the Relion piece of source code at the
>> end of the mail that if both are passed, the consistency is check between
>> both and the --angpix option in both micrographs and particles star files.
>> I wonder if it is enough by passing only MAGNIFICATION and --angpix? (then
>> DETECTOR_PIXEL_SIZE is not required at all?).
>>
>> Imagine the case in which I downsample the particles by a factor of 2, if
>> I
>> pass the same MAGNIFICATION and double the --angpix everything should be
>> fine?
>>
>> Apart from that, we could also pass the proper DETECTOR_PIXEL_SIZE. What
>> is
>> the recommended/preferred way for Relion?
>>
>> Bests,
>> Jose Miguel.
>>
>>
>> ===========================================
>>
>> // Check consistency of EMDL_CTF_MAGNIFICATION and
>> MEBL_CTF_DETECTOR_PIXEL_SIZE with mymodel.pixel_size
>>>
>>> DOUBLE mag, dstep, first_angpix, my_angpix;
>>
>> bool has_magn = false;
>>
>> if (mydata.MDimg.containsLabel(EMDL_CTF_MAGNIFICATION) &&
>>> mydata.MDimg.containsLabel(EMDL_CTF_DETECTOR_PIXEL_SIZE))
>>
>> {
>>
>> FOR_ALL_OBJECTS_IN_METADATA_TABLE(mydata.MDimg)
>>
>> {
>>
>> mydata.MDimg.getValue(EMDL_CTF_MAGNIFICATION, mag);
>>
>> mydata.MDimg.getValue(EMDL_CTF_DETECTOR_PIXEL_SIZE, dstep);
>>
>> my_angpix = 10000. * dstep / mag;
>>
>> if (!has_magn)
>>
>> {
>>
>> first_angpix = my_angpix;
>>
>> has_magn = true;
>>
>> }
>>
>> else if (ABS(first_angpix - my_angpix) > 0.01)
>>
>> {
>>
>> std::cerr << " first_angpix= " << first_angpix << " my_angpix= " <<
>>> my_angpix << " mag= " << mag << " dstep= " << dstep << std::endl;
>>
>> REPORT_ERROR("MlOptimiser::initialiseGeneral: ERROR inconsistent
>>> magnification and detector pixel sizes in images in input STAR file");
>>
>> }
>>
>> }
>>
>> }
>>
>> if (mydata.MDmic.containsLabel(EMDL_CTF_MAGNIFICATION) &&
>>> mydata.MDmic.containsLabel(EMDL_CTF_DETECTOR_PIXEL_SIZE))
>>
>> {
>>
>> FOR_ALL_OBJECTS_IN_METADATA_TABLE(mydata.MDmic)
>>
>> {
>>
>> mydata.MDimg.getValue(EMDL_CTF_MAGNIFICATION, mag);
>>
>> mydata.MDimg.getValue(EMDL_CTF_DETECTOR_PIXEL_SIZE, dstep);
>>
>> my_angpix = 10000. * dstep / mag;
>>
>> if (!has_magn)
>>
>> {
>>
>> first_angpix = my_angpix;
>>
>> has_magn = true;
>>
>> }
>>
>> else if (ABS(first_angpix - my_angpix) > 0.01)
>>
>> REPORT_ERROR("MlOptimiser::initialiseGeneral: ERROR inconsistent
>>> magnification and detector pixel sizes in micrographs in input STAR
>>> file");
>>
>> }
>>
>> }
>>
>> if (has_magn && ABS(first_angpix - mymodel.pixel_size) > 0.01)
>>
>> {
>>
>> if (verb > 0)
>>
>> std::cout << "MlOptimiser::initialiseGeneral: WARNING modifying pixel
>>> size from " << mymodel.pixel_size <<" to "<<first_angpix << " based on
>>> magnification information in the input STAR file" << std::endl;
>>
>> mymodel.pixel_size = first_angpix;
>>
>> }
>>
>>
>>> }
>>
>>
>> ==============================
>>
>> PS: I guess iterating over all micrographs/particles is cheap anyway, but
>> all the rows have the same MAGNIFICATION and DETECTOR_PIXEL_SIZE, so after
>> the first element the loop could be halted.
>
>
> --
> Sjors Scheres
> MRC Laboratory of Molecular Biology
> Francis Crick Avenue, Cambridge Biomedical Campus
> Cambridge CB2 0QH, U.K.
> tel: +44 (0)1223 267061
> http://www2.mrc-lmb.cam.ac.uk/groups/scheres
|