// how to get input from user
let d = core.getFloat("Getting float value");
let i = core.getInt("Getting integer value");
let s = core.getString("Getting string value");

// print user input
core.log("Your input " + d + " " + i + " " + s);

for(file of files)
{
  if(file.suffix() == "fits" || file.suffix() == "fit" || file.suffix() == "xisf")
  {
    let keywords = file.fitsKeywords();
    let item = core.getItem(keywords, "Select keyword");
    core.log("You selected keyword " + item);    core.log(file.fitsKeywords());

    core.log("fileName() " + file.fileName());
    core.log("absoluteFilePath() " + file.absoluteFilePath());
    core.log("absolutePath() " + file.absolutePath());
    core.log("relativeFilePath() " + file.relativeFilePath());
    core.log("relativePath() " + file.relativePath());
    core.log("baseName() " + file.baseName());
    core.log("completeBase() " + file.completeBaseName());
    core.log("suffix() " + file.suffix());
    core.log("size() " + file.size());
    let stats = file.stats();
    core.log("Image statistics");
    core.log("\tMinimum: " + stats.min);
    core.log("\tMaximum: " + stats.max);
    core.log("\tMedian:" + stats.median);
    core.log("\tStandard deviation:" + stats.stddev);
    core.log("\tMedian Absolute Deviation:" + stats.mad);

    break;
  }
}
