Versions Compared

Key

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

...

  • scriptLanguage - name of the scripting language in which the application is written. Currently only one language is available:
    • MATLAB - MATLAB programming language. This applies also to Octave applications 
  • executableScriptNamename of the application executable file
  • functionNamename of main function used to execute the application
  • inputFiles (Optional*) - input files that are needed by the application. For each input file defined here, the application panel will show a button to choose the location of that file. When the application is run, the input files will be read into a MATLAB variables and passed as arguments to the main executable function in the order in which they appear here.  Each input file is defined by: 
    • dataType - data type of the input (see Data Types section below)
    • typeLabel (Optional*) - a name distinguishing this input file from others. Allows to have multiple input files with the same data type. Each input file with different type label will be treated as a separate input and be passed to the main function as a separate argument  
    • multiplicity - how many inputs of that type are expected (written as string value). Defines minimum required number and maximum allowed number of inputs. The portal validates if the user selected the correct number of input files, and if not, it will not allow the user to run the application. Depending on what multiplicity is given the input(s) might be passed to the main function in a different way (see Handling custom multiplicity in input files section). The possible values are:
      • ? -  zero or one. The input is optional, there can be at most one input file
      • * -  zero or more. The input is optional and there is no upper limit of how many input files there can be
      • + - one or more. At least one file is required and there is no upper limit of how many input files there can be
      • n - exactly n input files are expected - no more, no less  
      • [n, m] - there should be at least n input files and at most m input files
  • inputParameters (Optional*) - simple input parameters that should be entered by the userFor each parameter defined here, the application panel will show input form where the user can enter the value of the parameterWhen the application is run, the parameters' values will be passed as arguments to the main executable function in the order in which they appear here. The parameter arguments are added after arguments specified by input files (see section Executable Script). When adding a parameter you have to specify what kind of value it should have. The available options are:
    • TEXT - a text value
    • BOOLEAN - a true or false value
    • DOUBLE - a real number value
    • INTEGER - an integer value
    • TIME - a date value
      The screen-shot below shows how the input parameters will appear when they are presented as input forms in the application panel

...

  • 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 below)
    • 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
    • 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 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

...

Code Block
languagejs
{
  "scriptLanguage":"MATLAB",
  "executableScriptName":"sampleScriptName.m",
  "functionNameinputFiles":"sampleScriptName",
[
  "inputFiles":[
    {
      "dataType":"double_vector",
      "multiplicity":"1",
      "typeLabel": "label"
    }
  ],
  "inputParameters":[
    "DOUBLE",
    "TEXT"
  ],
  "outputs":[
    {
      "dataType":"double_vector",
      "fileName":"output.mat",
      "isReturnedValue":false,
      "fileFormat":"MAT"
    }
  ],
  "requiredComputationResources":{
    "COMPUTATION_TIME":5
  },
  "requiredTools":[
    "octave"
  ]
}

Anchor
DataTypes
DataTypes
Data Types

The data type field that is present in input and output definition must contain a name of one of predefined data types. It is important that the name is written in exactly the same way as it is in the predefined data type. You can check the possible data types in the upload file form in the platform, or you can contact us. The most commons types are: 

  • 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
  • text_data - a text file
  • catalog - a seismic catalog
  • ground_motion_catalog - a ground motion catalog
  • fullseed - a full-SEED miniseed - a miniSEED file (SEED file that that contains both data records and station informationonly data record)miniseed - a miniSEED
  • fullseed - a full-SEED file (SEED file that that contains only data recordboth 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

Anchor
FileFormats
FileFormats
File Formats

The file format field that is present in output definition must contain a name of one of predefined file format. It is important that the name is written in exactly the same way as it is in the predefined type. The file format should also match the data type specified for the output, as not all the formats are supported with a specific data type - e.g. a seismic catalog cannot be written (and later read from) a PNG file. You can check the possible combinations of data types and file formats in the upload file form in the platform, or you can contact us. The most commons types are:

  • MAT - for Matlab/Octave data files
  • MINISEED - for miniSEED files (SEED files that contain only data record)
  • SEED - for full-SEED files (SEED files that contain both data records and station information)
  • DATALESS - for dataless SEED files (the files contain only station information)
  • SAC - for time series data written in a SAC format
  • PLAIN_TEXT - for files in any text format (Note, that, as DATALESS is also a text format, this could be applied also to DATALESS files) 
  • PNG - for image files in PNG format
  • JPG - for image files in JPG format

Executable Script (Required)

...