; Separates particles into montages that will fit on one screen in WEB ; ----------- Parameters ----------- x56 = 4 ; print progress message to screen every (x56)th micrograph x24 = 150 ; number of images per montage ; determine empirically how many will conveniently fit on the screen ; -------------- Input -------------- fr l [neg_particle_table]order_picked ; group-to-particle lookup table, AP SH batch files ; [neg_particle_table]order ; for AP MQ batch files ; ------------- Output ------------- fr l [montage_doc]coords/docmontage ; montage doc filename prefix ; file-pattern: [montage_doc]{****neg#}_{**montage#} ; -------- END BATCH HEADER --------- ; get the micrograph filenumbers ud n,x10 [neg_particle_table] ; loop through micrographs do lb1 x11=1,x10 ; get micrograph statistics ud ic,x11,x55,x20,x99,x21,x29 [neg_particle_table] ; x20==#particles, x55==micrograph#, x21==first particle#, x29==last particle# if (int(x11/x56).eq.x11/x56) then vm echo "Working on micrograph #{***x55}, {***x11} out of {***x10}" endif ; calculate number of montages needed (x32) x32=int((x20-1)/x24)+1 ; x20==#particles, x24==particles/montage ; loop through montages do lb2 x30=1,x32 x38 = (x30-1)*x24+1 ; x38==first particle in montage x39 = x30*x24 ; x39==last particle in montage if(x39.gt.x20)x39=x20 ; cap particle number at last one de ; delete pre-existing files [montage_doc]{****x55}_{**x30} ; loop through particles per montage do lb3 x40=x38,x39 ; calculate particle-numer (x43) x43=x21+x40-1 ; x21==first particle#, x40==loop-counter sd x40,x43 [montage_doc]{****x55}_{**x30} ; x55==micrograph#, x30==montage# lb3 ; end particle loop lb2 ; end montage loop lb1 ; end micrograph loop ud ice ; close document [neg_particle_table] en d ; Modified 2006-05-12 ; 2006-05-12 (trs) -- input filename updated to reflect change in PNUMS.SPI ; 2004-11-30 (trs) -- Micrograph# is now the 1st column in order, and #particles the 3rd ; 2004-07-08 (trs) -- Micrographs are now four digits ; 2004-07-06 (trs) -- Gets number of micrographs from order rather than filenums