Error exporting .cu3s file using example scripts: incorrect processing mode #77
Answered
by
birkholz-cubert
fernandoseara
asked this question in
Q&A
Answered by
birkholz-cubert
May 21, 2025
Replies: 1 comment
|
Hello, you are right that the Measurement needs to be processed (ProcessingMode != Preview) before being exported. Some code for this can be found in example 2: print("loading processing context...")
processingContext = cuvis.ProcessingContext(session)
print("maybe set some references...")
# processingContext.set_reference(dark, cuvis.ReferenceType.Dark)
# processingContext.set_reference(white, cuvis.ReferenceType.White)
# processingContext.set_reference(distance, cuvis.ReferenceType.Distance)
procArgs = cuvis.ProcessingArgs()
# Choose a processing mode depending on your setup
procArgs.processing_mode = cuvis.ProcessingMode.Raw
if processingContext.is_capable(mesu, procArgs):
print("processing to mode {}...".format(procArgs.processing_mode))
processingContext.set_processing_args(procArgs)
mesu = processingContext.apply(mesu)I hope this helps and let me know if you have any further questions. |
0 replies
Answer selected by
fernandoseara
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Hello,
you are right that the Measurement needs to be processed (ProcessingMode != Preview) before being exported.
When the measurements have been recorded and saved without going through the processing context, this step has not happened yet.
The easiest way for this would be to process it into raw mode (no ther references needed).
Some code for this can be found in example 2: