Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • outputs - list of outputs generated by the application. The outputs defined here should be returned as output variables by the main executable function. After the function is run each of these outputs will be saved as a mat file and returned as a result of the application. Each output is defined by:
    • dataType - data type that this output file should have  (see Data Types section)
    • fileName - name of the file under which this output should be saved
    • isReturnedValue - (applies to Matlab and Octave applications) value informing whether the variable is additionally declared as output of the function that is executed. In such case, the value would be automatically packed to a file in .mat  format and setting the fileFormat property is not required. The default value is false .
    • fileFormat - format of the produced file (see File Formats section)
  • requiredTools - list of programs or tools that are needed to run the application. At least one value should be present - the script interpreter. Please contact us if you need any other tools, or toolboxes, or if you require a specific version of a Matlab or Octave interpreter. Available options are:
    • matlab - the MATLAB interpreter. By default one of these versions will be used: 2019b or 2021a (state as of October 2021, the versions might be updated in the future). 
    • matlab-signal_processing_toolbox - signal processing toolbox. Usable only with MATLAB
    • matlab-image_processing_toolbox - image processing toolbox. Usable only with MATLAB
    • octave - the Octave interpreter. By default one of these versions will be used: 3.8.1 or 4.2.1 (state as of October 2021, the versions might be updated in the future)
  • requiredComputationResources (Optional) - a map defining what computational resources should be available to the application. Available options are: 
    • COMPUTATION_TIME - maximum time that an application needs for the computation (in minutes). If not specified it defaults to 30 minutes 
    • MEMORY - maximum memory that an application needs for the computation (in gigabytes). If not specified it defaults to 2GB 
    • CPU_COUNT - number of processors that should be available to the application. If not specified it defaults to 1

...

  • double_vector - a vector of real number values
  • time_vector - a vector of date values
  • integer_vector - a vector of integer values
  • boolean_vector - a vector of boolean values 
  • string_vector - a vector of text values
  • image_data - an image file
  • text_data - a text file
  • catalog - a seismic catalog
  • ground_motion_catalog - a ground motion catalog
  • miniseed - a miniSEED file (SEED file that contains only data record)
  • fullseed - a full-SEED file (SEED file that contains both data records and station information)
  • dataless - a dataless SEED (contains only station information)
  • seed - denotes a type that can be either a fullseed or a miniseed. Should be used when it does not matter if the seed file contains the dataless information or not
  • sac - time series data written in a SAC format
  • injection_rate - file containing injection rate
  • water_level - file containing water level

...

The main script of the application that is the entry point of the application. The name of the script file should be the same as executableScriptName defined in the application definition file and the script should contain a function that has the same name as the functionNamethe file. The main function should have the same number of inputs and outputs as defined in the application definition file. The names of the input and output variables are irrelevant. For example, if the application definition contains:

Code Block
languagejs
"functionNameexecutableScriptName": "sampleFunctionName.m",
"inputParameters": ["TEXT", "DOUBLE"],
"inputFiles": [{ "dataType" : "integer_vector", "multiplicity" : "1"},  { "dataType" : "string_vector", "multiplicity" : "1"}],
"outputs": [{ "dataType" : "double_vector", "fileName" : "output1.mat", "isReturnedValue" : true},  { "dataType" : "boolean_vector", "fileName" : "output2.mat"}]

the executable script could look like that:

, "isReturnedValue" : true}, { "dataType" : "image_data", "fileName" : "plot.png", "fileFormat" : "PNG"} ]

the executable script could look like that:

Code Block
function [outputDoubleValues, outputBooleanValues] = 
Code Block
function [outputDoubleValues, outputBooleanValues] = sampleFunctionName(intValues, stringValues, text, multiplicator)
  outputDoubleValues = double(intValues) * multiplicator multiplicator;
  outputBooleanValues = strcmp(stringValues, text);
  plot(outputDoubleValues);
  outputBooleanValues = strcmp(stringValues, textprint('-dpng', 'plot.png');
end

The order of inputs and outputs corresponds to the order in which they are defined in the application definition file, with the note that inputFiles variables come before inputParameters variables. For the above example the order of variables would be as follows:

  • intValues - corresponds to the input file with type 'integer_vector'
  • stringValues - corresponds to the input file with type 'string_vector'
  • text - corresponds to the input parameter with type TEXT
  • multiplicator - corresponds to the input parameter with type DOUBLE
  • outputDoubleValues - corresponds to the output with type 'double_vector'
  • outputBooleanValues - corresponds to the output with type 'boolean_vector'

Additionally, another file is produced within the script - an image file plot.png - it is not declared in the function outputs (but has to be declared in the application definition file).

Handling custom multiplicity in input files

...