diff --git a/scripts/convert to XISF b/scripts/convert to XISF
index 70b3cc6..26400df 100644
--- a/scripts/convert to XISF
+++ b/scripts/convert to XISF
@@ -1,11 +1,5 @@
core.log("This script convert any FITS file into XISF with ZSTD compression");
-if(files.length == 0)
-{
- core.log("No input files");
- throw "";
-}
-
let compression = {"compressionType": "zstd+sh"};
for(file of files)
diff --git a/scripts/measure HFR b/scripts/measure HFR
new file mode 100644
index 0000000..b7841c1
--- /dev/null
+++ b/scripts/measure HFR
@@ -0,0 +1,49 @@
+core.log("Measure HFR and eccentricity of stars");
+
+var chart = {
+ "title": "Measure stars",
+ "legend": {"visible": true, "align": "left"},
+ "series": [
+ {
+ "title": "HFR",
+ "type": "bar",
+ "y":[]
+ },
+ {
+ "title": "Ecc",
+ "type": "bar",
+ "y":[]
+ },
+ {
+ "title": "Star count",
+ "type": "linePoints",
+ "y":[],
+ "y2": true,
+ "bestFit": true
+ }
+ ]
+};
+
+core.setSolverProfile(5);
+for(file of files)
+{
+ if(file.suffix() == "fits" || file.suffix() == "fit" || file.suffix() == "xisf")
+ {
+ var stars = file.extractStars(true);
+ var sumHFR = 0;
+ var ecc = 0;
+ for(star of stars)
+ {
+ sumHFR += star.HFR;
+ ecc += Math.sqrt(1 - (star.b * star.b) / (star.a * star.a));
+ }
+ chart.series[0].y.push(sumHFR / stars.length);
+ chart.series[1].y.push(ecc / stars.length);
+ chart.series[2].y.push(stars.length);
+
+ core.log(file.fileName() + " Stars:" + stars.length + " HFR: " + sumHFR / stars.length + " Ecc: " + ecc / stars.length);
+ }
+}
+
+core.plot(chart);
+
diff --git a/scripts/modify FITS header b/scripts/modify FITS header
index 6edc4ee..9b41f43 100644
--- a/scripts/modify FITS header
+++ b/scripts/modify FITS header
@@ -1,3 +1,5 @@
+core.log("Script to modify FITS header in FITS and XISF files");
+
function checkFITS(key)
{
const noEditableKey = ["SIMPLE", "BITPIX", "NAXIS", "NAXIS1", "NAXIS2", "NAXIS3", "EXTEND", "BZERO", "BSCALE"];
diff --git a/scripts/plate solve b/scripts/plate solve
new file mode 100644
index 0000000..b947d58
--- /dev/null
+++ b/scripts/plate solve
@@ -0,0 +1,17 @@
+core.log("Plate solve and update solution");
+
+var first = true;
+
+for(file of files)
+{
+ if(file.suffix() == "fits" || file.suffix() == "fit" || file.suffix() == "xisf")
+ {
+ var solution = file.solve(true);
+ if(first)
+ {
+ core.setStartingSolution(solution);
+ first = false;
+ }
+ core.log(file.fileName() + " " + "RA: " + (solution.ra / 15) + "h DEC: " + solution.dec + "deg");
+ }
+}
diff --git a/scripts/scripts.qrc b/scripts/scripts.qrc
index fabfd07..456baef 100644
--- a/scripts/scripts.qrc
+++ b/scripts/scripts.qrc
@@ -4,5 +4,7 @@
convert to XISF
median
modify FITS header
+ measure HFR
+ plate solve