Page 1 of 1

Command Line Import

Posted: November 19th, 2021, 7:57 pm
by robinweber250A
I'm trying to use the command line interface to import and process images.

Here is an example command line that I am trying:
"C:\GC Image\GC Image 2020r2 GCxGC (64-bit)\bin\Cli.bat" -sysu -method "Y:\GCxGC-Markes\Robin\New Tube Analysis 20211119\QA_baseline.method" -s "Y:\GCxGC-Markes\Jennifer\H3 Conditioned Tubes 2021\Markes_new tubes\2021-11-17\20211117_1178383 70eV.lsc" -d "Y:\GCxGC-Markes\Robin\New Tube Analysis 20211119\TestOut\20211117_1178383 70eV.gci"

What I get when I try this is:
INFO: 4:12:46 PM Log in: Goldstein Lab
INFO: 4:12:46 PM Importing run: Y:\GCxGC-Markes\Jennifer\H3 Conditioned Tubes 2021\Markes_new tubes\2021-11-17\20211117_1178383 70eV.lsc
SEVERE: 4:12:46 PM Error: Missing time or pixel parameters for importing.

Clearly GCImage wants the second dimension modulation period, normally entered interactively on the Import Settings dialog when importing manually.

How can I pass the proper timing parameters when using the command line? Is there a way to specify an import settings file? I can't find any way to do this.

Thanks!
Robin

Re: Command Line Import

Posted: November 20th, 2021, 10:07 am
by qtao
You can use the -Time argument to specify the raw data importing parameters, for example

Code: Select all

-Time "mod=3;auto"
  • mod - the modulation period in seconds
  • sampling - the sampling rate in Hz
  • auto - a flag indicating to automatically use parameters (i.e. sampling rate, start time, and run time) stored in the raw data file

Re: Command Line Import

Posted: November 20th, 2021, 11:08 am
by robinweber250A
Thank you qtao, that worked!

Is there documentation for other useful command line parameters? I did not see the -Time parameter in the help.

Many thanks! Robin

Re: Command Line Import

Posted: November 21st, 2021, 10:34 am
by qtao
Besides what described in User Guide, there are other hidden arguments. We didn't publish them because they are not polished for general usage. But, if you encounter any use case that CLI does not seem to work, just ask us.

Re: Command Line Import

Posted: April 21st, 2022, 4:00 pm
by robinweber250A
@qtao, I've been using the CLI to create a very useful automation.

Is there an option in the CLI to use an import settings file during importation?

Thanks,
Robin

Re: Command Line Import

Posted: April 21st, 2022, 4:07 pm
by robinweber250A
Specifically, what I want to do is to crop the image along the 1st dimension retention time. This is an option in the advanced import settings, and I believe is saved in the import settings file.

Re: Command Line Import

Posted: April 21st, 2022, 6:07 pm
by robinweber250A
I also want to be able to specify an image file to subtract (Having a subtract image step in the method) when using the CLI.

Re: Command Line Import

Posted: April 22nd, 2022, 1:08 pm
by geschd23
Is there an option in the CLI to use an import settings file during importation?
Using an import settings file is not currently supported with the CLI.
Specifically, what I want to do is to crop the image along the 1st dimension retention time.
The -1stDim argument can be used to specify cropping (-2ndDim for 2nd dimension cropping).

Code: Select all

-1stDim "From=1.5;To=5.5;Selected=true"
* From - the start crop time in minutes (seconds for 2ndDim)
* To - the end crop time in minutes (seconds for 2ndDim)
* Selected - should always be set to 'true' to perform cropping
I also want to be able to specify an image file to subtract (Having a subtract image step in the method) when using the CLI.
Version 2020 includes the Subtract an Image method command which can be used via the CLI. However, the CLI does not currently support specifying method command parameters at runtime and will display an error if runtime parameters are present.

If a fixed Image to Subtract parameter is suitable for your case, you can specify the parameter in the method editor UI, and the command will be compatible with the CLI.

If you require specifying the Image to Subtract parameter at runtime, a few workarounds are possible:
  • Prior to calling the GC Image CLI, your script could modify the method arguments (contained in the <methodName>.method/.script file).
  • Prior to calling the GC Image CLI, your script could copy the desired image file to the location pointed to by the Image to Subtract parameter in your method. Both the .gci file and the associated .bin/.cdf file need to be copied. The .gci file must be renamed to match the name expected by the method, but the .bin/.cdf file must keep its original name.