diff --git a/about/help_en b/about/help_en index 5577467..ff09ffc 100644 --- a/about/help_en +++ b/about/help_en @@ -139,13 +139,13 @@ There is global object called core that have these methods.
  • mark(file) mark file same way as in GUI. Takes object of type File as argument.
  • unmark(file) unmark file same was as in GUI. Takes object of type File as argument.
  • isMarked(file) check if file was marked. Takes object of type File as argument.
  • -
  • setMaxThread(maxthread) set maximum number of concurent thread when doing asynchronious task.
  • -
  • sync() wait until all asynchronious tasks are done.
  • +
  • setMaxThread(maxthread) set maximum number of concurrent thread when doing asynchronous task.
  • +
  • sync() wait until all asynchronous tasks are done.
  • getString(label = "", text = "") show dialog box to get string value from user. String value passed in first argument is used as description label. Second argument text is default value in text box. Both parameters are optional so calling just getString() is valid. When cancel is pressed it return Undefined.
  • -
  • getInt(label = "", value = 0) show dialog box with input box to retrive integer value. String value passed in first argument is used as description label. +
  • getInt(label = "", value = 0) show dialog box with input box to retrieve integer value. String value passed in first argument is used as description label. Second parameter is default value in input box. Both parameters are optional. When cancel is pressed it return Undefined.
  • -
  • getFloat(label = "", value = 0, decimals = 3) show dialog box with input box to retrive decimal value. String value passed in first argument is used as description label. +
  • getFloat(label = "", value = 0, decimals = 3) show dialog box with input box to retrieve decimal value. String value passed in first argument is used as description label. Second parameter is default value in input box. All three parameters are optional. When cancel is pressed it return Undefined.
  • getItem(items) show selection dialog which allow to select one item from array of items. When cancel is pressed it return Undefined.
  • @@ -164,27 +164,27 @@ In files array there are instances of type File objects that have
  • suffix() return string after last dot in file name. For example fits
  • size() return size of file in bytes.
  • fitsKeywords() return array of strings with every keyword that is in header. SIMPLE,BITPIX,NAXIS,NAXIS1,NAXIS2,EXTEND,COMMENT
  • -
  • fitsValue(key) return value for keyword. In case that there is multiple occurences it return last one.
  • +
  • fitsValue(key) return value for keyword. In case that there is multiple occurrences it return last one.
  • fitsValues(key) return array of values for keyword.
  • fitsRecords() return array of objects with properties key, value and comment
  • modifyFITSRecords(FITSRecordModify) modify FITS header by adding, removing or updating FITS record. Return true on success. Refer to FITSRecordModify
  • isMarked() return true if file is marked.
  • copy(newpath) copy file to new location. It return instance of new File object that represent this copied file. This path can be relative or absolute. In case that newpath parameter is relative - path then it "Output directory" from GUI windows is used as base directory. Paramer newpath can absolute path. File is then copied to this path. In case that copy fail it return null.
  • + path then it "Output directory" from GUI windows is used as base directory. Parameter newpath can absolute path. File is then copied to this path. In case that copy fail it return null.
  • move(newpath) move file to new location. It return false if move failed. This can happend if destination is not writable but also if destination file already exist. This functions does not overwrite existing file. - This path can be relative or absolute. In case that newpath parameter is relative path then it "Output directory" from GUI windows is used as base directory. Paramer newpath can absolute path. + This path can be relative or absolute. In case that newpath parameter is relative path then it "Output directory" from GUI windows is used as base directory. Parameter newpath can be absolute path. File is then moved to this path.
  • convert(outpath, format, params) convert image file from any format that program is able to open into FITS, XISF, JPEG, PNG, BMP. Parameters are: outputpath path where converted image will be saved. It automatically replace suffix according to format. format one of "FITS" "XISF", "JPG", "PNG" or "BMP". params object with attributes "compressionType" and "compressionLevel". Valid values for compressionType are be "gzip" or "rice" when converting to FITS. When converting to XISF compressionType can be "zlib", "lz4", "lz4hc", "zstd", "zlib+sh", "lz4+sh", "lz4hc+sh", "zstd+sh". - It is recomended to use "+sh" variants of compression. + It is recommended to use "+sh" variants of compression. XISF format also accept "compressionLevel" in range 0-100 where zero is fastest compression and 100 slowest. If you omit this attribute or set it to -1 then default compression level will be used. It return new instance of File that point to converted file.
    file.convert("converted_file.xisf", "xisf", {"compressionType": "zstd+sh", "compressionLevel": 70});
     file.convert("converted_file.fits", "fits", {"compressionType": "rice"});
     file.convert("converted_file.jpg", "png");
  • -
  • convertAsync(outpath, format, params) same as previous method but it does conversion in separated thread asynchroniously. Before calling any method on object returned by this method you must call +
  • convertAsync(outpath, format, params) same as previous method but it does conversion in separated thread asynchronously and in parallel. Before calling any method on object returned by this method you must call core.sync(); to ensure that conversion is done and destination file exists.
    let compression = {"compressionType": "zstd+sh"};
     let convertedFiles = [];