Paragon-neo/100G: Automation - Transferring capture files to the local PC
Python wrapper: Yes TCL wrapper: No
Functions to transfer capture files and folders from the instrument to the local PC.
calnexDownloadCatFiles(dest_folder: str = './', sub_folder: str = None)
calnexDownloadCatSessions(files: str = 'All', dest_folder: str = './', new_subfolder: str = None)
Note: One of the two commands below will do what most users want - identify and transfer the files that are currently loaded into CAT, regardless of which folder they are in on the instrument (Neo creates multiple folders) and copy them to the current working folder on the local PC. They can be run without arguments, although they have optional parameters to further manage the download.
calnexDownloadCatFiles()calnexDownloadCatSessions()
Neo creates multiple session folders and not all the files from multiple folders may be loaded into CAT at any time, even during a measurement (“PortEvents100.CDF” is one such instance). The user may wish to transfer only the loaded files, optionally into a new local folder, or download all the separate instrument session folders retaining the folder names, this is why there are two commands - one refers just to the loaded files, the other to the session folders that contain the loaded files.
calnexDownloadCatFiles()
Downloads all capture files currently loaded into CAT to a local folder.
Defaults to the current folder unless a sub-folder is specified.
Arguments:
dest_folder str
The name of the folder on the local machine where the
remote files will be saved
sub_folder str (Optional)
The sub-folder where the files are to be copied to. If this does
not exist it will be created.
Results:
If the local destination folder does not exist then the wrapper will
raise a runtime error.
If there are duplicate filenames in the download set, the wrapper will
raise a runtime error, this is to prevent loss of data.
If the local file or folder can't be accessed then Python will raise a
file access error.
Returns:
List of dictionaries of the session files and foldersExamples:
calnexDownloadCatFiles()
Download all loaded capture files from CAT to the current working local folder.
calnexDownloadCatFiles('c:/home/temp', 'My_New_Folder')
Download all loaded capture files from CAT to the new (to be automatically created) folder “My_New_Folder”, within the (already existing) local destination folder “c:/home/temp”
calnexDownloadCatSessions()
Downloads the session folders of the captures currently loaded into CAT
to a local folder. If a new folder name is specified and it does not
exist, it will be created.
Subfolders are created with the same session folder name as on the
instrument.
Arguments:
files str
"All":
(Default) Downloads all files in all the session folders
where a file from that session folder is currently loaded into
CAT. This is primarily to get all PortEvents100.CDF.
"LoadedOnly":
Downloads only the files that are currently loaded into
CAT. The files will still be in their separate folders.
dest_folder str
The name of the folder on the local machine where the
remote folders will be copied to.
Raises:
If the local destination folder does not exist then the wrapper will
raise a runtime error.
If the local file or folder can't be accessed then Python will raise a
file access error.
Returns:
List of dictionaries of the session files and foldersExamples:
calnexDownloadCatSessions()
Download all all files from session folders that have a capture currently loaded into CAT, to the current local folder
calnexDownloadCatSessions(files='All', dest_folder = 'c:/home/temp')
Download all session files and folders that have a capture currently loaded into CAT, to the specified local folder.