StochasticAnalytics / emClarity

GNU Lesser General Public License v3.0
40 stars 6 forks source link

ctf estimate error,how can i solve this problem? #162

Closed IAMCHF closed 8 months ago

IAMCHF commented 8 months ago

(base) ubuntu@ml-ubuntu20-04-desktop-v1-0-108gb-25m:/HBV/emClarity_caohaofan/project1$ emClarity ctf estimate param1.m tilt1 1 Found tmpfs /dev/shm with max mem 54303848 bytes using this for MCR_CACHE_ROOT

##############

Created a tmp MCR_CACHE locally at /dev/shm/emC_tmp_2756632395
Available mem is 51.7882 GB
Started emC_memClean to make sure it removed in the event of a crash.
Default kill time is a max of 10080 minutes

##############

ctfroot is /dev/shm/emC_tmp_2756632395/.mcrCache9.10/emClar0

    ***************************************

emClarity version c66d497 run starting on 30-Oct-2023 16:39:51 cmd ctf estimate param1.m tilt1 1

    ***************************************

Found and using your ramDisk nExpGlobals 14.00 maskLP, 2.50 maskThr, 0.50 pcaMaskThr

cudaStart =

0x0 empty char array

The number of gpus requested matches those visible to the system Found and using your ramDisk nExpGlobals 14.00 maskLP, 2.50 maskThr, 0.50 pcaMaskThr

ans =

struct with fields:

           subTomoMeta: 'project1'
       fastScratchDisk: ''
                 nGPUs: 2
             nCpuCores: 22
            PIXEL_SIZE: 2.1000e-10
            CUM_e_DOSE: 120
          beadDiameter: 1.0000e-08
       SuperResolution: 0
                    Cs: 0.0020
               VOLTAGE: 300000
               AMPCONT: 0.0700
         doseAtMinTilt: 3
     oneOverCosineDose: 0
         startingAngle: -60
     startingDirection: 'neg'
doseSymmetricIncrement: 0
           defEstimate: 3.5000e-06
             defWindow: 2.0000e-06
             defCutOff: 7.0000e-10
       deltaZtolerance: 5.0000e-08
                zShift: 1.5000e-07
   ctfMaxNumberOfTiles: 4000
           ctfTileSize: 6.8000e-08
            paddedSize: 768

Sending to gpu with the most available memory 1 with 97.64% Using standard emClarity tilted ctf estimate.

Modifying the local alignments Unrecognized function or variable 'BH_trimIMODLocal'.

Error in BH_ctf_Estimate (line 89)

Error in emClarity (line 515)

MATLAB:UndefinedFunction

IAMCHF commented 8 months ago

before this, i run the command: emClarity autoAlign param1.m tilt1.st tilt1.rawtlt 175 1 and emClarity autoAlign param1.m tilt2.st tilt1.rawtlt 175 1 then i ls the ./fixedStacks : image

bHimes commented 8 months ago

This is a multi-layered bug of sorts.

Background info

1 - the function it is complaining about is supposed to modify the local tilt-series alignments from imod when tilts are skipped. The thing is, those files are hard to parse and the actual function (BH_trimIMODLocal.m) doesn't actually do anything - it is empty.

2 - So I thought in this case, the local alignments were just supposed to be ignored, which not ideal, also not a big problem as long as you later run tomoCPR which makes much better local alignments anyway.

3 - no matter what, it should have been included in the compiled version of emClarity, unless for some reason the matlab compiler, mcc, ignored it during dependency analysis since it is an empty file? That seems unlikely as I run compiled versions myself.

Current workaround

For any tilt-series (lets call it tilt1.fixed) in your fixedStacks/ directory where you wish to ignore some tilts as in this command, one option is to delete (or rename to some other file extension) your tilt1.local - e.g.

mv tilt1.local tilt1.local_bck

bHimes commented 8 months ago

https://github.com/StochasticAnalytics/emClarity/issues/164#issue-1972219266