From 18e5d9d001302ccdd8ca8553a1dc96a0aa7797b4 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Mon, 10 Nov 2025 22:49:05 +0000 Subject: [PATCH 01/19] add setup builder for fbCollector --- .github/workflows/build_tools.yml | 13 ++++------- fbCollector/fireballcollector_setup.iss | 30 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 fbCollector/fireballcollector_setup.iss diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index 8f5798c3..babb97b1 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -97,13 +97,8 @@ jobs: - name: packaging run: | echo "packaging the app now" - cd fbCollector\dist - copy ../ukmda.ico . - copy ../config.ini.sample . - copy ../download_events.sh . - copy ../noimage.jpg . - copy ../README.md . - compress-archive -path . -update -destinationpath c:\temp\fbcollector.zip + cd fbCollector + & 'C:\Program Files (x86)\Inno Setup 6\Compil32.exe' .\fireballcollector_setup.iss /cc release_fbtool: name: release fbcollector runs-on: win10 @@ -115,11 +110,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.MM_PAT }} with: - file: c:\temp\fbcollector.zip + file: fbCollector\setup_fireballCollector.exe tags: true draft: true overwrite: true - tag_name: 2025.10.1 + tag_name: 2025.11.1 default_release_name: Tools to Gather Fireball data and Manage UKMON Cameras default_release_body_path: fbCollector\README.md cleanup_fbtool: diff --git a/fbCollector/fireballcollector_setup.iss b/fbCollector/fireballcollector_setup.iss new file mode 100644 index 00000000..459468dd --- /dev/null +++ b/fbCollector/fireballcollector_setup.iss @@ -0,0 +1,30 @@ +#define MyAppName "UKMON Fireball Analyser" + +[Setup] +AppName=UKMON Fireball Analyser +AppVersion="1.0.0" +AppPublisher=UK Meteor Network +AppPublisherURL=https://www.ukmeteornetwork.org +DefaultDirName={localappdata}\programs\fbAnalyser +DefaultGroupName=UKMON_fbAnalyser +UninstallDisplayIcon={app}\fireballCollector.exe +Compression=lzma2 +SolidCompression=yes +OutputDir={src} +OutputBaseFilename=setup_fireballCollector +PrivilegesRequired=lowest + +[Files] +Source: ".\dist\fireballCollector.exe"; DestDir: "{app}" +Source: ".\dist\noimage.jpg"; DestDir: "{app}" +Source: ".\dist\ukmda.ico"; DestDir: "{app}" +Source: ".\dist\download_events.sh"; DestDir: "{app}" +Source: ".\dist\config.ini.sample"; DestDir: "{app}"; Permissions: users-modify + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; + +[Icons] +Name: "{group}\Fireball Analyser"; Filename: "{app}\fireballCollector.exe"; IconFilename: "{app}\ukmda.ico" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\fireballCollector.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\ukmda.ico" From d048124ffed8d1253153e6799de0a8af9620f6ac Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Mon, 10 Nov 2025 23:00:53 +0000 Subject: [PATCH 02/19] Update temp output path --- .github/workflows/build_tools.yml | 2 +- fbCollector/fireballcollector_setup.iss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index babb97b1..d6c5685e 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -110,7 +110,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.MM_PAT }} with: - file: fbCollector\setup_fireballCollector.exe + file: c:\temp\setup_fireballCollector.exe tags: true draft: true overwrite: true diff --git a/fbCollector/fireballcollector_setup.iss b/fbCollector/fireballcollector_setup.iss index 459468dd..ba63e4d4 100644 --- a/fbCollector/fireballcollector_setup.iss +++ b/fbCollector/fireballcollector_setup.iss @@ -10,7 +10,7 @@ DefaultGroupName=UKMON_fbAnalyser UninstallDisplayIcon={app}\fireballCollector.exe Compression=lzma2 SolidCompression=yes -OutputDir={src} +OutputDir=c:\temp OutputBaseFilename=setup_fireballCollector PrivilegesRequired=lowest From af57e4a0e49f71f9b4edf1714d7952c115646e3c Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Mon, 10 Nov 2025 23:14:01 +0000 Subject: [PATCH 03/19] Update setup and build scripts --- .github/workflows/build_tools.yml | 11 +++++------ fbCollector/fireballcollector_setup.iss | 11 ++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index d6c5685e..da21dfef 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -95,10 +95,9 @@ jobs: - build_fbtool steps: - name: packaging - run: | - echo "packaging the app now" - cd fbCollector - & 'C:\Program Files (x86)\Inno Setup 6\Compil32.exe' .\fireballcollector_setup.iss /cc + uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 + with: + path: .\fbCollector\fireballcollector_setup.iss release_fbtool: name: release fbcollector runs-on: win10 @@ -110,7 +109,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.MM_PAT }} with: - file: c:\temp\setup_fireballCollector.exe + file: e:\temp\setup_fireballCollector.exe tags: true draft: true overwrite: true @@ -126,4 +125,4 @@ jobs: steps: - name: delete package run: | - del c:\temp\fbcollector.zip + del e:\temp\setup_fireballCollector.exe diff --git a/fbCollector/fireballcollector_setup.iss b/fbCollector/fireballcollector_setup.iss index ba63e4d4..ee6aacfc 100644 --- a/fbCollector/fireballcollector_setup.iss +++ b/fbCollector/fireballcollector_setup.iss @@ -10,16 +10,17 @@ DefaultGroupName=UKMON_fbAnalyser UninstallDisplayIcon={app}\fireballCollector.exe Compression=lzma2 SolidCompression=yes -OutputDir=c:\temp +OutputDir=e:\temp OutputBaseFilename=setup_fireballCollector PrivilegesRequired=lowest [Files] Source: ".\dist\fireballCollector.exe"; DestDir: "{app}" -Source: ".\dist\noimage.jpg"; DestDir: "{app}" -Source: ".\dist\ukmda.ico"; DestDir: "{app}" -Source: ".\dist\download_events.sh"; DestDir: "{app}" -Source: ".\dist\config.ini.sample"; DestDir: "{app}"; Permissions: users-modify +Source: ".\noimage.jpg"; DestDir: "{app}" +Source: ".\ukmda.ico"; DestDir: "{app}" +Source: ".\download_events.sh"; DestDir: "{app}" +Source: ".\config.ini.sample"; DestDir: "{app}"; Permissions: users-modify +Source: ".\README.md"; DestDir: "{app}"; Permissions: users-modify [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; From a6545744743ad2b6bfcec976e7373e06567c62a0 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Mon, 10 Nov 2025 23:34:56 +0000 Subject: [PATCH 04/19] tweak packaging tools --- .github/workflows/build_tools.yml | 20 ++++++--------- fbCollector/fireballcollector_setup.iss | 2 +- usermgmt/windows/cam_management_setup.iss | 30 +++++++++++++++++++++++ 3 files changed, 39 insertions(+), 13 deletions(-) create mode 100644 usermgmt/windows/cam_management_setup.iss diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index da21dfef..f8573a96 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -42,13 +42,9 @@ jobs: - build_usermgmt steps: - name: packaging - run: | - echo "packaging the app now" - cd usermgmt\windows\dist - copy ../camera.ico . - copy ../stationmaint.ini.sample . - copy ../../README.md . - compress-archive -path . -update -destinationpath c:\temp\ukmon_usermgmt.zip + uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 + with: + path: usermgmt\cam_management_setup.iss release_usermgmt: name: release usermanagement runs-on: win10 @@ -60,23 +56,23 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.MM_PAT }} with: - file: c:\temp\ukmon_usermgmt.zip + file: e:\temp\setup_cameraMgmt.exe tags: true draft: true overwrite: true - tag_name: 2025.10.1 + tag_name: 2025.11.1 default_release_name: User Management Tool default_release_body_path: usermgmt\windows\release_notes.md cleanup_usermgmt: - name: clean up temp usermanagement files + name: clean up temp cameramgmt files runs-on: win10 continue-on-error: true needs: - release_usermgmt steps: - - name: delete temp usermgmt package + - name: delete temp cameramgmt package run: | - del c:\temp\ukmon_usermgmt.zip + del e:\temp\setup_cameraMgmt.exe build_fbtool: name: build fbcollector runs-on: win10 diff --git a/fbCollector/fireballcollector_setup.iss b/fbCollector/fireballcollector_setup.iss index ee6aacfc..729660b8 100644 --- a/fbCollector/fireballcollector_setup.iss +++ b/fbCollector/fireballcollector_setup.iss @@ -6,7 +6,7 @@ AppVersion="1.0.0" AppPublisher=UK Meteor Network AppPublisherURL=https://www.ukmeteornetwork.org DefaultDirName={localappdata}\programs\fbAnalyser -DefaultGroupName=UKMON_fbAnalyser +DefaultGroupName=UKMON UninstallDisplayIcon={app}\fireballCollector.exe Compression=lzma2 SolidCompression=yes diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss new file mode 100644 index 00000000..6424b61b --- /dev/null +++ b/usermgmt/windows/cam_management_setup.iss @@ -0,0 +1,30 @@ +#define MyAppName "UKMON Camera Management" + +[Setup] +AppName=UKMON Camera Management +AppVersion="2.0.0" +AppPublisher=UK Meteor Network +AppPublisherURL=https://www.ukmeteornetwork.org +DefaultDirName={localappdata}\programs\cameraMgmt +DefaultGroupName=UKMON +UninstallDisplayIcon={app}\stationMaint2.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=e:\temp +OutputBaseFilename=setup_cameraMgmt +PrivilegesRequired=lowest + +[Files] +Source: ".\dist\cameraMgmt.exe"; DestDir: "{app}" +Source: ".\camera.ico"; DestDir: "{app}" +Source: ".\download_events.sh"; DestDir: "{app}" +Source: ".\stationmaint.ini.sample"; DestDir: "{app}"; Permissions: users-modify +Source: ".\README.md"; DestDir: "{app}"; Permissions: users-modify + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; + +[Icons] +Name: "{group}\Camera Management"; Filename: "{app}\cameraMgmt.exe"; IconFilename: "{app}\ukmda.ico" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\cameraMgmt.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\ukmda.ico" From 210bfcf1ff9f47d7c43b88ec1381886d18e67f1b Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Mon, 10 Nov 2025 23:36:03 +0000 Subject: [PATCH 05/19] whoops error in action script --- .github/workflows/build_tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index f8573a96..b871287a 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -44,7 +44,7 @@ jobs: - name: packaging uses: Minionguyjpro/Inno-Setup-Action@v1.2.2 with: - path: usermgmt\cam_management_setup.iss + path: usermgmt\windows\cam_management_setup.iss release_usermgmt: name: release usermanagement runs-on: win10 From c9607109d43799505836253874e76066c1dcdc50 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Mon, 10 Nov 2025 23:51:49 +0000 Subject: [PATCH 06/19] fix error in camera mgmt packaging --- usermgmt/windows/cam_management_setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss index 6424b61b..57eab97f 100644 --- a/usermgmt/windows/cam_management_setup.iss +++ b/usermgmt/windows/cam_management_setup.iss @@ -15,7 +15,7 @@ OutputBaseFilename=setup_cameraMgmt PrivilegesRequired=lowest [Files] -Source: ".\dist\cameraMgmt.exe"; DestDir: "{app}" +Source: ".\dist\stationMaint2.exe"; DestDir: "{app}" Source: ".\camera.ico"; DestDir: "{app}" Source: ".\download_events.sh"; DestDir: "{app}" Source: ".\stationmaint.ini.sample"; DestDir: "{app}"; Permissions: users-modify From 956f8553c4550f286851de88fb1f0ded8b1347ea Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 00:00:59 +0000 Subject: [PATCH 07/19] another typo in the packaging step --- usermgmt/windows/cam_management_setup.iss | 1 - 1 file changed, 1 deletion(-) diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss index 57eab97f..379ca3e7 100644 --- a/usermgmt/windows/cam_management_setup.iss +++ b/usermgmt/windows/cam_management_setup.iss @@ -17,7 +17,6 @@ PrivilegesRequired=lowest [Files] Source: ".\dist\stationMaint2.exe"; DestDir: "{app}" Source: ".\camera.ico"; DestDir: "{app}" -Source: ".\download_events.sh"; DestDir: "{app}" Source: ".\stationmaint.ini.sample"; DestDir: "{app}"; Permissions: users-modify Source: ".\README.md"; DestDir: "{app}"; Permissions: users-modify From fa1786a30d205196144ac0135db40819b8dd2148 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 00:11:58 +0000 Subject: [PATCH 08/19] another bug in the packaging script --- usermgmt/windows/cam_management_setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss index 379ca3e7..408253cf 100644 --- a/usermgmt/windows/cam_management_setup.iss +++ b/usermgmt/windows/cam_management_setup.iss @@ -18,7 +18,7 @@ PrivilegesRequired=lowest Source: ".\dist\stationMaint2.exe"; DestDir: "{app}" Source: ".\camera.ico"; DestDir: "{app}" Source: ".\stationmaint.ini.sample"; DestDir: "{app}"; Permissions: users-modify -Source: ".\README.md"; DestDir: "{app}"; Permissions: users-modify +Source: "..\README.md"; DestDir: "{app}"; Permissions: users-modify [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; From eb1af4bf078a4d3c89d1bb66afe8ff3a2513c86e Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 00:28:48 +0000 Subject: [PATCH 09/19] correct the icon for cam mgmt --- usermgmt/windows/cam_management_setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss index 408253cf..a94de5e3 100644 --- a/usermgmt/windows/cam_management_setup.iss +++ b/usermgmt/windows/cam_management_setup.iss @@ -24,6 +24,6 @@ Source: "..\README.md"; DestDir: "{app}"; Permissions: users-modify Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; [Icons] -Name: "{group}\Camera Management"; Filename: "{app}\cameraMgmt.exe"; IconFilename: "{app}\ukmda.ico" +Name: "{group}\Camera Management"; Filename: "{app}\cameraMgmt.exe"; IconFilename: "{app}\camera.ico" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\cameraMgmt.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\ukmda.ico" From 467578baaf0c2732ad10619272467e3a44680160 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 00:50:10 +0000 Subject: [PATCH 10/19] aniother small bug --- usermgmt/windows/cam_management_setup.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss index a94de5e3..fa8f427b 100644 --- a/usermgmt/windows/cam_management_setup.iss +++ b/usermgmt/windows/cam_management_setup.iss @@ -26,4 +26,4 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Icons] Name: "{group}\Camera Management"; Filename: "{app}\cameraMgmt.exe"; IconFilename: "{app}\camera.ico" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" -Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\cameraMgmt.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\ukmda.ico" +Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\cameraMgmt.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\camera.ico" From f0cc1b4d802f8aa9ef770c84b730d8c4d8c591c4 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 01:03:36 +0000 Subject: [PATCH 11/19] final bugfix i hope --- usermgmt/windows/cam_management_setup.iss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usermgmt/windows/cam_management_setup.iss b/usermgmt/windows/cam_management_setup.iss index fa8f427b..bb9adfa7 100644 --- a/usermgmt/windows/cam_management_setup.iss +++ b/usermgmt/windows/cam_management_setup.iss @@ -24,6 +24,6 @@ Source: "..\README.md"; DestDir: "{app}"; Permissions: users-modify Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; [Icons] -Name: "{group}\Camera Management"; Filename: "{app}\cameraMgmt.exe"; IconFilename: "{app}\camera.ico" +Name: "{group}\Camera Management"; Filename: "{app}\stationMaint2.exe"; IconFilename: "{app}\camera.ico" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" -Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\cameraMgmt.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\camera.ico" +Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\stationMaint2.exe"; Tasks: desktopicon; WorkingDir: {app}; IconFilename: "{app}\camera.ico" From bcead816690308b7eecbec8c743c4895c9ccfc6e Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 11:47:19 +0000 Subject: [PATCH 12/19] bugfix to getTrajpickle --- fbCollector/fireballCollector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index 242a093f..d2c863ee 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -876,6 +876,8 @@ def getTrajpickle(self): trajpick = f'{basepatt}_trajectory.pickle' url = f'https://archive.ukmeteors.co.uk/reports/{ymd[:4]}/orbits/{ymd[:6]}/{ymd}/{fullpatt}/{trajpick}' log.info(f'{url}') + self.dir_path = os.path.join(self.fb_dir, basepatt[:15]) + os.makedirs(self.dir_path, exist_ok=True) get_response = requests.get(url, stream=True) if get_response.status_code == 200: log.info(f'retrieved {trajpick}') From 097b085e614e2b12bc9580233cbe16a086e78f08 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 12:21:50 +0000 Subject: [PATCH 13/19] another bugfix in pickle retriever --- fbCollector/fireballCollector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index d2c863ee..ae5afe01 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -869,14 +869,15 @@ def getData(self): def getTrajpickle(self): basepatt = os.path.split(self.dir_path)[1] - ymd = basepatt[:8] fullpatt = askstring('Trajectory Name', 'eg 20240101_010203.345_UK', initialvalue=basepatt) if not fullpatt: return - trajpick = f'{basepatt}_trajectory.pickle' + ymd = fullpatt[:8] + trajpick = f'{fullpatt}_trajectory.pickle' url = f'https://archive.ukmeteors.co.uk/reports/{ymd[:4]}/orbits/{ymd[:6]}/{ymd}/{fullpatt}/{trajpick}' log.info(f'{url}') self.dir_path = os.path.join(self.fb_dir, basepatt[:15]) + log.info(self.dir_path) os.makedirs(self.dir_path, exist_ok=True) get_response = requests.get(url, stream=True) if get_response.status_code == 200: From 061fcba88c89820930f3a8f6b6e74dfca7311328 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 13:45:11 +0000 Subject: [PATCH 14/19] another small bugfix --- fbCollector/fireballCollector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index ae5afe01..b27dcb2b 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -873,10 +873,10 @@ def getTrajpickle(self): if not fullpatt: return ymd = fullpatt[:8] - trajpick = f'{fullpatt}_trajectory.pickle' + trajpick = f'{fullpatt[:15]}_trajectory.pickle' url = f'https://archive.ukmeteors.co.uk/reports/{ymd[:4]}/orbits/{ymd[:6]}/{ymd}/{fullpatt}/{trajpick}' log.info(f'{url}') - self.dir_path = os.path.join(self.fb_dir, basepatt[:15]) + self.dir_path = os.path.join(self.fb_dir, fullpatt[:15]) log.info(self.dir_path) os.makedirs(self.dir_path, exist_ok=True) get_response = requests.get(url, stream=True) From e6c50b7c4bbef1880ca661511d0cbb97766500a5 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 14:50:28 +0000 Subject: [PATCH 15/19] bind the del key and autoselect next image --- fbCollector/fireballCollector.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index b27dcb2b..3cdebaa6 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -437,7 +437,6 @@ def initUI(self): save_bmp = StyledButton(self.save_panel, text="Remove", width = 8, command = lambda: self.remove_image()) save_bmp.grid(row = 1, column = 4) - # Listbox self.scrollbar = Scrollbar(self) self.listbox = Listbox(self, width = 47, yscrollcommand=self.scrollbar.set, exportselection=0, activestyle = "none", bg = global_bg, fg = global_fg) @@ -448,6 +447,9 @@ def initUI(self): self.listbox.bind('<>', self.update_image) self.scrollbar.config(command = self.listbox.yview) + # bind delete key + self.listbox.bind("", lambda x: self.remove_image()) + # IMAGE try: # Show the TV test card image on program start @@ -796,6 +798,7 @@ def remove_image(self): """ Remove the selected image from disk """ current_image = self.listbox.get(ACTIVE) + curr_row = self.listbox.curselection() if current_image == '': return if not tkMessageBox.askyesno("Delete file", f"delete {current_image}?"): @@ -815,6 +818,10 @@ def remove_image(self): pass self.selected[current_image] = (0,'') self.update_listbox(self.get_bin_list()) + maxrows = self.listbox.index("end") + curr_row = (max(min(maxrows-1, curr_row[0]),0),) + self.listbox.select_set(curr_row) + self.update_image('x') def update_image(self, thing): """ When selected, load a new image @@ -876,7 +883,10 @@ def getTrajpickle(self): trajpick = f'{fullpatt[:15]}_trajectory.pickle' url = f'https://archive.ukmeteors.co.uk/reports/{ymd[:4]}/orbits/{ymd[:6]}/{ymd}/{fullpatt}/{trajpick}' log.info(f'{url}') - self.dir_path = os.path.join(self.fb_dir, fullpatt[:15]) + if self.patt is None: + self.dir_path = os.path.join(self.fb_dir, fullpatt[:15]) + else: + self.dir_path = os.path.join(self.fb_dir, self.patt) log.info(self.dir_path) os.makedirs(self.dir_path, exist_ok=True) get_response = requests.get(url, stream=True) @@ -886,6 +896,9 @@ def getTrajpickle(self): for chunk in get_response.iter_content(chunk_size=4096): if chunk: # filter out keep-alive new chunks f.write(chunk) + if self.patt is None: + self.patt = fullpatt[:15] + self.newpatt.set(self.patt) else: log.info(f'unable to retrieve {trajpick}, {get_response.status_code}') return From 4b233d9e0edce51171f927bf1be4b5255dac4968 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 16:19:12 +0000 Subject: [PATCH 16/19] a couple more improvements --- fbCollector/fireballCollector.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index 3cdebaa6..4ba4af5e 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -756,6 +756,8 @@ def archiveFolder(self): log.warning(f'unable to remove folder, please do it manually {self.dir_path}') log.warning(e) self.dir_path = self.fb_dir + self.dir_path = self.fb_dir + self.viewData() def delFolder(self): noimgdata = img.open(noimg_file).resize((640,360)) @@ -821,6 +823,7 @@ def remove_image(self): maxrows = self.listbox.index("end") curr_row = (max(min(maxrows-1, curr_row[0]),0),) self.listbox.select_set(curr_row) + self.listbox.activate(curr_row) self.update_image('x') def update_image(self, thing): @@ -875,7 +878,10 @@ def getData(self): self.update_listbox(self.get_bin_list()) def getTrajpickle(self): - basepatt = os.path.split(self.dir_path)[1] + if self.dir_path: + basepatt = os.path.split(self.dir_path)[1] + else: + basepatt = '' fullpatt = askstring('Trajectory Name', 'eg 20240101_010203.345_UK', initialvalue=basepatt) if not fullpatt: return From 0bcd6cb24fe85f2a4f2c7e5d935bb861bf8732ef Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 16:25:44 +0000 Subject: [PATCH 17/19] bugfix to capability detection --- fbCollector/fireballCollector.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index 4ba4af5e..39501ab7 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -254,7 +254,7 @@ def readConfig(self): self.gmn_key = None self.gmn_user = None self.gmn_server = None - if localcfg.has_option('gmnkey','gmnkey'): + if localcfg.has_option('gmn','gmnkey'): self.gmn_key = localcfg['gmn']['gmnkey'] self.gmn_user = localcfg['gmn']['gmnuser'] self.gmn_server = localcfg['gmn']['gmnserver'] @@ -283,7 +283,7 @@ def readConfig(self): self.share_loc = None - if localcfg.has_option('share','shrfldr'): + if localcfg.has_option('sharing','shrfldr'): self.share_loc = os.path.expanduser(localcfg['sharing']['shrfldr'].replace('$HOME','~')).replace('\\','/') def quitApplication(self): From a06df0e92fe2895b31a4a08700a52a0a9a411933 Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 22:10:14 +0000 Subject: [PATCH 18/19] Add help menu and include docs --- .github/workflows/build_tools.yml | 1 + .gitignore | 1 + fbCollector/README.md | 20 ++++++++++---------- fbCollector/fireballCollector.py | 12 +++++++++--- fbCollector/fireballcollector_setup.iss | 2 +- fbCollector/requirements.txt | 3 ++- 6 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_tools.yml b/.github/workflows/build_tools.yml index b871287a..bf764cf4 100644 --- a/.github/workflows/build_tools.yml +++ b/.github/workflows/build_tools.yml @@ -84,6 +84,7 @@ jobs: conda activate fbcollector cd fbCollector pyinstaller ./fireballCollector.py --onefile --windowed --icon .\ukmda.ico + markdown2 ./README.md > README.html package_fbtool: name: package fbcollector runs-on: win10 diff --git a/.gitignore b/.gitignore index 6e4b5f8b..e897bccc 100644 --- a/.gitignore +++ b/.gitignore @@ -617,3 +617,4 @@ servercopybkp/* fbcollector/config.ini usermgmt/windows/stationmaint.ini usermgmt/windows/README.md +fbCollector/README.html diff --git a/fbCollector/README.md b/fbCollector/README.md index 4887015b..3d466676 100644 --- a/fbCollector/README.md +++ b/fbCollector/README.md @@ -11,18 +11,18 @@ This tool allows authorised users to collect fireball data from UKMON and GMN an The above are sufficient to collect data from UKMON and to analyse data either collected from UKMON or by other means. There are additional configuration options that can be used to collect data from GMN and upload solutions to UKMON. These are described inline below. ## Installation -* Clone this repository to a location of your choice -* Install WMPL and RMS, and activate the WMPL python virtual environment. -* Change directory into the location of this code then install the additional requiremnts with `pip install -r requirements.txt` -* Copy `config.ini.sample` to `config.ini` and update the values of `basedir`, `rms_loc`, `rms_env`, `wmpl_loc`, and `wmpl_env` as appropriate. +* Install the package `setup_fireballCollector.exe` from https://github.com/ukmda/ukmda-dataprocessing/releases +* Install WMPL and RMS and verify they're working. ## Using the App -* Launch the app by running `fbCollector.ps1` in a Powershell window. After a few seconds the GUI window should appear. +* Launch the app from the desktop icon or start menu. After a few seconds a text editor will appear to allow you to configure the application. +* Update the values of `basedir`, `rms_loc`, `rms_env`, `wmpl_loc`, and `wmpl_env` as appropriate and save. + * In the box labelled `Image Selection` enter a date and time in the format `YYYYMMDD_HHMMSS`, then click "Get Images". * After a few seconds, the listbox below should be populated with images from around the time you selected, provided the UKMON live feed captured something. - * If nothing appears, check the UKMON [livestream](https://archive.ukmeteors.co.uk/live/index.html) to make sure you chose the correct time. + * If nothing appears, check the UKMON [livestream](https://archive.ukmeteors.co.uk/live/index.html) to make sure you chose a suitable time. -* Go through the image list and click `Remove` to delete any that are not of the event you are interested in. +* Go through the image list and click `Remove` or press the `Delete` key to delete any that are not of the event you are interested in. * Once you've whittled the list down to just the interesting events, you can select `Get ECSVs` from the `Raw` menu. This will attempt to get raw data for each image. You can also click `Get Videos` to collect any video data thats available. * Now you can click `Solve` from the `Solve` menu. This will invoke WMPL and will attempt to find a trajectory that matches the raw data. It may take some time. * If the solver is successful, you can view the solution by selecting `View Solution` from the `Solve` menu. The left-hand list will now show the output of the solver so you can examine it. You can switch back to viewing the raw images by selecting `Review Images` from the `Review` menu. @@ -30,19 +30,19 @@ The above are sufficient to collect data from UKMON and to analyse data either c * If the solution was bad its also worth deleting it before attempting a rerun via `Delete Solution` from the `Solve` menu. ## Manually Reducing an Image -If you've installed RMS then if you have a FITS or FR file from RMS along with the camera's config and platepar files, you can run RMS's `SkyFit2` tool to analyse the image - select and image then select `Reduce Selected Image` from the `Raw` menu. +If you've installed RMS and you have a FITS or FR file from RMS along with the camera's config and platepar files, you can run RMS's `SkyFit2` tool to analyse the image - select and image then select `Reduce Selected Image` from the `Raw` menu. ## Sending Solutions to UKMON Once you have a solution, select `Upload orbit` from the `Solve` menu. This will create a Zip file that bundles the created trajectory pickle file with any images and videos. You can then upload the file to Dropbox, Google Drive or another file-sharing site and email a link to fireballdata@ukmeteornetwork.org where one of our team will validate and upload it to our Archive. #### API Key -Members of the UKMON team who frequently create solutions can request an API key to upload solutions less than 10 MB in size. We'll contact you if we think this is applicable. +Members of the UKMON team who frequently create solutions can request an API key to directly upload solutions less than 10 MB in size. We'll contact you if we think this is applicable. ### Collecting data from GMN Members of the GMN coordinators group who have permission from Denis Vida can use this tool to collect data directly from GMN or using the GMN Watchlist. If you fall into this category you can fill in the `[gmnanalysis]` section of the config file with the name of your SSH private key and other details. This will activate additional menu options to `Get GMN Raw Data` and to use the `Watchlist`. If you're running on Windows, you will need WSL2 enabled and the rsync tool installed in WSL2. ## Logs -The programme creates logs in your system's `TEMP` folder. +The programme creates logs in your system's `TEMP` folder, in a subfolder `fbcollector`. diff --git a/fbCollector/fireballCollector.py b/fbCollector/fireballCollector.py index 39501ab7..00d7c92f 100644 --- a/fbCollector/fireballCollector.py +++ b/fbCollector/fireballCollector.py @@ -17,6 +17,7 @@ from PIL import Image import requests import pandas as pd +import webbrowser import paramiko from scp import SCPClient @@ -418,10 +419,13 @@ def initUI(self): otherMenu = Menu(self.menuBar, tearoff=0) otherMenu.add_command(label="Get Traj Pickle", command=self.getTrajpickle) otherMenu.add_command(label="Add Image/Vid", command=self.addImageVideo) - solveMenu.add_separator() + otherMenu.add_separator() otherMenu.add_command(label="Delete Orbit", command=self.delOrbit) self.menuBar.add_cascade(label="Other", underline=0, menu=otherMenu) + helpMenu = Menu(self.menuBar, tearoff=0) + helpMenu.add_command(label="Documentation", command=self.showDocs) + self.menuBar.add_cascade(label="Help", underline=0, menu=helpMenu) # buttons self.save_panel = LabelFrame(self, text=' Image Selection ') self.save_panel.grid(row = 1, columnspan = 2, sticky='WE') @@ -472,6 +476,10 @@ def reviewConfig(self): self.readConfig() self.initUI() + def showDocs(self): + webbrowser.open('README.html') + return + def reduceCamera(self): current_image = self.listbox.get(ACTIVE) if current_image == '': @@ -750,7 +758,6 @@ def archiveFolder(self): log.warning(f'unable to create archive {self.dir_path}') log.warning(e) try: - os.chdir(self.fb_dir) shutil.rmtree(self.dir_path) except Exception as e: log.warning(f'unable to remove folder, please do it manually {self.dir_path}') @@ -1062,7 +1069,6 @@ def getEventData(self): ret = tkMessageBox.askyesno("Wait", f'Should wait till {self.evtMonTriggered.strftime("%H:%M:%S")} - continue anyway?') if ret is False: return - os.chdir(self.fb_dir) log.info(f'getting data for {evtdate}') procid = subprocess.Popen(('bash','-c', cmd)) procid.wait() diff --git a/fbCollector/fireballcollector_setup.iss b/fbCollector/fireballcollector_setup.iss index 729660b8..d9cafc18 100644 --- a/fbCollector/fireballcollector_setup.iss +++ b/fbCollector/fireballcollector_setup.iss @@ -20,7 +20,7 @@ Source: ".\noimage.jpg"; DestDir: "{app}" Source: ".\ukmda.ico"; DestDir: "{app}" Source: ".\download_events.sh"; DestDir: "{app}" Source: ".\config.ini.sample"; DestDir: "{app}"; Permissions: users-modify -Source: ".\README.md"; DestDir: "{app}"; Permissions: users-modify +Source: ".\README.html"; DestDir: "{app}" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; diff --git a/fbCollector/requirements.txt b/fbCollector/requirements.txt index f8283c73..12447143 100644 --- a/fbCollector/requirements.txt +++ b/fbCollector/requirements.txt @@ -6,4 +6,5 @@ scp pyqtgraph xmltodict requests -pandas \ No newline at end of file +pandas +markdown2 \ No newline at end of file From eec39576f58c2a4688ecd4929cdba353b49d6e2e Mon Sep 17 00:00:00 2001 From: Mark McIntyre Date: Tue, 11 Nov 2025 22:27:33 +0000 Subject: [PATCH 19/19] Updated documentation --- fbCollector/README.md | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/fbCollector/README.md b/fbCollector/README.md index 3d466676..6cd3c759 100644 --- a/fbCollector/README.md +++ b/fbCollector/README.md @@ -6,43 +6,52 @@ This tool allows authorised users to collect fireball data from UKMON and GMN an * You have installed [WMPL](https://github.com/wmpg/WesternMeteorPyLib/), used to solve trajectories. * You have installed [RMS](https://github.com/CroatianMeteorNetwork/RMS), used to reduce raw data. -* A local folder where you will store fireball data. This is called `basedir` in this documentation. +* You have a local folder where you will store fireball data. This is called `basedir` in this documentation. The above are sufficient to collect data from UKMON and to analyse data either collected from UKMON or by other means. There are additional configuration options that can be used to collect data from GMN and upload solutions to UKMON. These are described inline below. ## Installation -* Install the package `setup_fireballCollector.exe` from https://github.com/ukmda/ukmda-dataprocessing/releases +* Install the package `setup_fireballCollector.exe` from [here](https://github.com/ukmda/ukmda-dataprocessing/releases). * Install WMPL and RMS and verify they're working. -## Using the App +## Configuring the App * Launch the app from the desktop icon or start menu. After a few seconds a text editor will appear to allow you to configure the application. * Update the values of `basedir`, `rms_loc`, `rms_env`, `wmpl_loc`, and `wmpl_env` as appropriate and save. -* In the box labelled `Image Selection` enter a date and time in the format `YYYYMMDD_HHMMSS`, then click "Get Images". -* After a few seconds, the listbox below should be populated with images from around the time you selected, provided the UKMON live feed captured something. +## Using the App +* Enter a date and time in the format `YYYYMMDD_HHMMSS` into the `Image Selection` box, then click "Get Images". + * After a few seconds, the listbox below should be populated with images from around the time you selected, provided the UKMON live feed captured something. * If nothing appears, check the UKMON [livestream](https://archive.ukmeteors.co.uk/live/index.html) to make sure you chose a suitable time. * Go through the image list and click `Remove` or press the `Delete` key to delete any that are not of the event you are interested in. * Once you've whittled the list down to just the interesting events, you can select `Get ECSVs` from the `Raw` menu. This will attempt to get raw data for each image. You can also click `Get Videos` to collect any video data thats available. + * Now you can click `Solve` from the `Solve` menu. This will invoke WMPL and will attempt to find a trajectory that matches the raw data. It may take some time. * If the solver is successful, you can view the solution by selecting `View Solution` from the `Solve` menu. The left-hand list will now show the output of the solver so you can examine it. You can switch back to viewing the raw images by selecting `Review Images` from the `Review` menu. + * If the solve process fails or if the solution seems very poor then try excluding some detections. To do this, select `Excl/Incl ECSV` from the `Raw` menu then rerun the Solver. * If the solution was bad its also worth deleting it before attempting a rerun via `Delete Solution` from the `Solve` menu. ## Manually Reducing an Image -If you've installed RMS and you have a FITS or FR file from RMS along with the camera's config and platepar files, you can run RMS's `SkyFit2` tool to analyse the image - select and image then select `Reduce Selected Image` from the `Raw` menu. +If you've installed RMS and you have a FITS or FR file from RMS along with the camera's config and platepar files, you can reduce the data using RMS's `SkyFit2` tool. Select an image in the file list then select `Reduce Selected Image` from the `Raw` menu. ## Sending Solutions to UKMON -Once you have a solution, select `Upload orbit` from the `Solve` menu. This will create a Zip file that bundles the created trajectory pickle file with any images and videos. You can then upload the file to Dropbox, Google Drive or another file-sharing site and email a link to fireballdata@ukmeteornetwork.org where one of our team will validate and upload it to our Archive. +Once you have a solution, select `Upload orbit` from the `Solve` menu. This will create a Zip file that bundles the created trajectory pickle file with any images and videos. You can then upload the file to Dropbox, Google Drive or another file-sharing site and email a link to [us](fireballdata@ukmeteornetwork.org) where one of our team will check and upload it to our Archive. #### API Key Members of the UKMON team who frequently create solutions can request an API key to directly upload solutions less than 10 MB in size. We'll contact you if we think this is applicable. +## Sharing Raw Data +If you've configured a raw data location in the configuration file, `Share Raw Data` on the raw menu will create a zip file of all the raw data and copy it to the location. For example, if you have Dropbox installed and set the share location to a folder in your Dropbox, then the zip file will be copied there. + ### Collecting data from GMN -Members of the GMN coordinators group who have permission from Denis Vida can use this tool to collect data directly from GMN or using the GMN Watchlist. If you fall into this category you can fill in the `[gmnanalysis]` section of the config file with the name of your SSH private key and other details. This will activate additional menu options to `Get GMN Raw Data` and to use the `Watchlist`. -If you're running on Windows, you will need WSL2 enabled and the rsync tool installed in WSL2. +Members of the GMN Coordinators group who have permission from Denis Vida can use this tool to collect raw data directly from GMN. + +If you fall into this category you can fill in the `[gmn]` section of the config file with the name of your SSH private key and other details. This will activate additional menu options to `Get GMN Raw Data` and to use the `Watchlist`. + +*Note that you will need WSL2 enabled and the rsync tool installed in WSL2 to run this process.* ## Logs -The programme creates logs in your system's `TEMP` folder, in a subfolder `fbcollector`. +You can view the logs from the `File` menu. The logs are created in [%TEMP%/fbcollector](%temp%/fbcollector).