
https://git.embl.de/schorb/pyem

On support pc, install MiniConda as admin, do not make it the system Python, otherwise IMOD breaks.

install pyem

SerialEM install with same settings, properties and calibrations files as the online SerialEM, this is best done on the Microscope support pc, as long as it can see the serialem .nav and map files for the session.

SerialEM shortcut should be:
"C:\Program Files\SerialEM\SerialEM.exe" /DUMMY
instead of 
"C:\Program Files\SerialEM\SerialEM.exe"

SerialEM properties, add:

NoScope 1
NoCameras 1
AssumeCameraForDummy 1   # Assuming this is the camera used for acquisition!

# SerialEM script integration

ExternalTool Open Nav File
ToolCommand 1 C:\Program Files\Notepad++\notepad++.exe
ToolArguments 1 %navfile%

ExternalTool Generate Virtual SPA Maps ('refmap')
ToolCommand 2  C:\scripts\callpython.bat
ToolArguments 2 C:\scripts\maps_acquire_cmd.py %navfile%

ExternalTool Generate Virtual Tomo Maps ('view'&'preview')
ToolCommand 3  C:\scripts\callpython.bat
ToolArguments 3 C:\scripts\virt_anchormaps.py %navfile%

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

Windows stuff:

C:\scripts\ should contain:
	callpython.bat
	maps_acquire_cmd.py
	virt_anchormaps.py

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

C:\scripts\maps_acquire_cmd.py, should have lines:
	# one example map at the desired settings (NavLabel)
	target_map = 'refmap'

C:\scripts\virt_anchormaps.py, should have lines:
	# file name navigator
	navname = sys.argv[1]

	# one example map at the desired settings (View) (NavLabel)
	view_map = 'view'

	# one example map at the desired settings (Preview) (NavLabel)
	preview_map = 'preview'

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

callpython.bat:

@echo off

set root=C:\ProgramData\Miniconda3

call %root%\Scripts\activate.bat %root%

call python %1 %2 %3 %4

echo Execution ended, will close this prompt in 10 seconds...

timeout /T 10

exit

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

