Project

General

Profile

Super resolution format unavailable to calibrate matrix and pixel size

Added by Bob Grassucci over 11 years ago

The large format for super resolution mode is not available in the GUI in both the matrix and Pixel size node of the calibration application. We are only using super resolution in the exposure presets but the lack of matrix calibration this will be a problem when multiple images are collected from a hole where image shift is used.


Replies (9)

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Anchi Cheng over 11 years ago

Can Presets Manager get the super resolution mode more consistently? If so, you can set camera geometry there with "override preset" unchecked in the calibration nodes. See Creating_Presets_for_the_first_time

I can see from the code that calibration nodes use a different method to get cameras than nodes like presetsmanager but don't have a good reason for the alternative method to fail, still.

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Anchi Cheng over 11 years ago

I attach here a python script to copy the calibrations from GatanK2Counting to GatanK2Super so that you can have the calibration even if you still cannot acquire binned super resolution image.

You will need to know the hostname for the K2 camera and the high tension in volts where the calibrations were performed. Run it in the same environment where you can run Leginon.

For example:

python copycal.py your_host 200000

The output looks something like this:

StageModelCalibrationData 6.20801792e-05
Uncomment in the script the line 'newdata.insert()' to insert to database

StageModelMagCalibrationData 38 4.11600335188e-08
Uncomment in the script the line 'newdata.insert()' to insert to database

StageModelMagCalibrationData 330 5.47185336369e-09
Uncomment in the script the line 'newdata.insert()' to insert to database

MatrixCalibrationData stage position 29000 -6.64085396084e-11
Uncomment in the script the line 'newdata.insert()' to insert to database

MatrixCalibrationData image shift 29000 4.82269015766e-11
Uncomment in the script the line 'newdata.insert()' to insert to database

MatrixCalibrationData defocus 29000 -2787561870.68
Uncomment in the script the line 'newdata.insert()' to insert to database

If you get some of these and no error is produced during the run, you can uncomment the line as indicate to insert the calibration in the database.

If you want to do the same copying to 'GatanK2Linear', then replace 'GatanK2Super' with it, and change pixelsize_scale to 1.

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Bob Grassucci over 11 years ago

I was able to get the full formats for super resolution this morning using the preset manager but had a problem where the calibration failed. I was unable to follow up due to scheduling conflicts but will try at some point soon with a grid with better contrast.

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Anchi Cheng over 11 years ago

There is the possibility that the full size super resolution is just too big to be practical for calibration because the need for doing correlation. Please try the copycal.py I attached above. No need to redo calibration when we know the ratio of the calibration should be.

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Anchi Cheng over 11 years ago

It should work on any of the computer you currently use because they all have the configuration for connection to database (sinedon.cfg) defined.

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Anchi Cheng over 7 years ago

An updated version of copycal.py is now in the repository renamed copy_k2_super_cal.py . See Issue #3247 for usage

RE: Super resolution format unavailable to calibrate matrix and pixel size - Added by Bob Grassucci over 7 years ago

I looked for copy_k2_super_cal.py in the repository and can not find it.

    (1-9/9)