1 of 93

Flash Detection Software

Workshop Section

Capture your own Impact Flash

Stefanos Achlatis, Georgia Christofidi

IAASARS, National Observatory of Athens, Greece

sachlatis@noa.gr

Project Duration: October 2021 – September 2022

ESA Contract No. 4000135574/21/NL/IB/gg

2 of 93

Installation

3 of 93

What Operating System do you have?

  • Our Software works for all 3 major OS

4 of 93

Online Detection Domain:

  • Visit FireCapture Site:
    • http://www.firecapture.de/
  • Scroll down and download FireCapture Version based on your OS
  • Then install FireCapture

5 of 93

Online Detection Domain:

  • Download our FDS Plugin
    • Download this jar
    • Name: FDS.jar
  • Open FireCapture Folder
  • Go to the “Plugins” folder (Fig. 1)
  • Open x64 or x86  folder depending on your installation (Fig. 2)
  • Create a folder (Fig. 3)
    • Name: FDS
  • Inside this folder place our plugin “FDS.jar” (Fig.4)

6 of 93

Simulations:

  • For this workshop we create some videos with impact flashes or other events.
  • Download these videos:
    • Here

Example of such video

7 of 93

Simulations:

Now we will place the simulations in Firecapture

  • Go to the FireCapture folder
  • Go to the “testImages” folder (Fig. 1)
  • Open the “moon” folder (Fig. 2)
  • Delete the existed “moon.avi” video
  • Take the first video
    • FDS_moon_1.avi
  • Place it in this folder
  • Rename the video (Fig. 3) :
    • Name: moon.avi

8 of 93

Let’s start

  • Open FireCapture and select Dummy Mode
    • If you had a camera, you would choose your real camera

9 of 93

Let’s start

  • Let’s set up our plugin
  • In the “Preprocessing” area press the “None” button
  • In the pop-up window select the FDS

10 of 93

Let’s start

  • Select a Threshold value
  • Then press the button “Press to start”

A proper threshold value is important. The program will capture the event only if at least one pixel of the frame has value greater than the threshold (in the difference image).

You can change this parameter, at any point during the observation.

Setting a big threshold value will lead to “miss” some events.

On the other hand, setting a small threshold value will cause false positives.

Set the proper value, based on the weather conditions and the system.

11 of 93

Logger

  • During the whole process make sure to look the “Logger”
  • Logger will print useful information about the process
    • Will inform you if you have captured any event
    • Will inform you about some stats of the event

12 of 93

Parameters

  • Select how many frames before and after the impact you would like to capture
  • In which format you would like to capture the frames: png, fits, or both

13 of 93

a-parameter

  • Weighted average
  • Same idea is used in NELIOTA software
  • Default value a=0.35

Frame 1

Frame 2

Average 1

(1-α) α

Average 1

Frame 3

Average 2

(1-α) α

Average N-1

Frame N+1

Average N

(1-α) α

1-st average

2-nd average

……

N-th average

α < 1.0

14 of 93

Location of output files

  • After your first detection you will see a new folder in the location C:\Users\stefo
  • The new folder is named “observations
  • There sub-directories of the day will be created
  • In the directory of the day, you will find enumerated all the detected events

15 of 93

Output Files

  • Metadata
  • Sequence of frames:
    • 5 (configurable parameter) before the event
    • The frames of the event
    • 5 (configurable parameter) after the event

frame_005

16 of 93

Metadata

  • In the dummy mode, metadata are dummy too
    • Timestamp is dummy
    • FPS is dummy
  • Include:
    • Timestamp
    • Number of pixels
    • Location (of pixels in the frame)
    • Camera Information
    • Capturing Information
    • FPS 

frame_005

17 of 93

Now we are ready to capture our first Lunar Impact Flash (provided by NELIOTA)

  • First easy example

18 of 93

First Video

  • Small duration video
  • The video will play on repeat, so you will see again and again the same impact flash
  • One frame impact flash (artificially set to be one frame)
  • Set the proper threshold
    • Around 100

frame_004

frame_005

19 of 93

Results

  • You will be notified by the logger that you have captured something
  • Go to the “writing path” and check what is written
  • Don’t let it run for much time, the video is small and will play on repeat thus you will capture many events

frame_005

20 of 93

Discussion

  • Event Info
  • Camera Info
  • Time Info

  • How many events did you captured?
  • Was this flash multi-frame?

frame_005

21 of 93

Second Event (provided by NELIOTA)

  • Multi-frame video

22 of 93

Set-up Second Simulation

Now we will place the second event in FireCapture

  • Go to the FireCapture folder
  • Go to the “testImages” folder (Fig. 1)
  • Open the “moon” folder (Fig. 2)
  • Hide the existed “moon.avi” video
  • Take the second video
    • FDS_moon_2.avi
  • Place it in this folder
  • Rename the video (Fig. 3) :
    • Name: moon.avi

23 of 93

Second Video

  • Multi-Frame Video
  • Now, experiment with different thresholds
  • How the threshold interact with multi-frame events?

frame_005

frame_006

24 of 93

Discussion

  • The duration of the event was N?
  • What threshold did you used?
  • Note that you capture: 5+N+5 frames

frame_005

25 of 93

Experiment:

  • Now set even smaller threshold.
  • What do we see?

frame_005

frame_006

26 of 93

Third Event (provided by NELIOTA)

  • Threading

27 of 93

Set-up Third Simulation

Now we will place the third event in FireCapture

  • Go to the FireCapture folder
  • Go to the “testImages” folder (Fig. 1)
  • Open the “moon” folder (Fig. 2)
  • Hide the existed “moon.avi” video
  • Take the third video
    • FDS_moon_3.avi
  • Place it in this folder
  • Rename the video (Fig. 3) :
    • Name: moon.avi

28 of 93

Third Video

  • This is a bigger video
  • We will use “threading”
  • Threading is enabled when a detection is occurred

Searching for flash

Writing flash

29 of 93

Experiment

  • In order to see the effect of threading set the parameters as shown in the figure
  • In this way we will make the writing process slightly slower, and you will see that the FireCapture will “lag” with the impact flash frame
  • Why?

Searching for flash

Writing flash

30 of 93

In which cases “threading” could be a problem?

Discussion

31 of 93

Discussion:

  • Threading could be a problem in the following cases:
  • When the moon is “shaking” due to bad weather or telescope movement if sunlit parts are included. This will lead to many fake detections.
  • What about satellites?

32 of 93

Question

  • If threading was enabled, will the movement of the lunar limb cause fake detection?

frame_005

33 of 93

Question

  • If threading was enabled, will a fast movement of the telescope cause a fake detection? Why?
  • If the threading was disabled, and no fast movement happened. Will we have a fake detection? Why?

frame_005

34 of 93

Why?

Frame 1

Frame 2

Frame 1

Frame 2

Before Processing

After Processing

35 of 93

Why?

Frame 1

Frame 2

Frame 1

Frame 2

36 of 93

Discussion

  • Let's see the results of the experiment. Open the frame_010.fits with a FITS viewer.
  • Point at the bright side, see that the value of the pixels in this region is 255.

frame_005

37 of 93

Fourth Event (provided by NELIOTA)

  • Impact Flash

38 of 93

Set-up Fourth Simulation

Now we will place the fourth event in FireCapture

  • Go to the FireCapture folder
  • Go to the “testImages” folder (Fig. 1)
  • Open the “moon” folder (Fig. 2)
  • Hide the existed “moon.avi” video
  • Take the fourth video
    • FDS_moon_4.avi
  • Place it in this folder
  • Rename the video (Fig. 3) :
    • Name: moon.avi

39 of 93

Fourth Video

  • This is a video with an impact flash with small duration
  • Set the proper threading and parameters

40 of 93

Discussion

  • What threading do you use?
  • Is a multi-frame impact or single-frame?

41 of 93

Offline Detection

42 of 93

Set-up

  • Firstly, unzip the folder DetectionStandalone.zip
  • Open the Detection Standalone app

43 of 93

Set-up

  • We will perform the task of offline detection in a satellite that was captured by NELIOTA
  • Name of the folder “FDS_offline_1”

frame_005

44 of 93

Set-up

  • We will perform the task of offline detection in an impact flash that was captured by NELIOTA
  • Name of the folder “FDS_offline_2”

frame_005

45 of 93

Set-up

  • We will perform the task of offline detection in an impact flash that was captured by NELIOTA
  • Name of the folder “FDS_offline_3”

frame_005

46 of 93

Set-up

  • Offline Detection could take the entire directory of the observations of the day, and not each event separately
  • Thus create a new folder and name it "FDS_Offline" and place all the above three events

frame_005

  • Each of these folders contains up to 50-200 events
  • Offline detection will inform us quickly which of them could be impact flashes, and which of them are satellite, cosmic rays 

47 of 93

First Step

  • Offline Detection could take the entire directory of the observations of the day, and not each event separately
  • Thus create a new folder and name it "FDS_Offline" and place all the above three events
  • Select this directory and press "Start Detection"
  • Wait a bit...

frame_005

48 of 93

What will happen while waiting:

  • For each event, the program will read some essential information from the metadata file
  • Select a Region of Interest around the event
  • Perform LevenbergMarquardt algorithm and fit a 2D Gaussian in the event
  • Depending on the characteristics of the Gaussian the program classify the event

49 of 93

Results

  • In the directory "FDS_Offline" you will find a .csv file with the results
  • Moreover, a folder named "Detection_Results" will be created
  • There you can find more information about each event detection results

50 of 93

Localization

51 of 93

First Event (provided by FDS team)

52 of 93

Set-up

  • We will perform the task of localization in an impact flash that we captured using this software on 03/06/22
  • Choose the folder “FDS_localization_1”

frame_005

frame_005

53 of 93

Set-up

  • Click “Event Localization”
  • Select the Directory of the event
  • Input observatory information as shown in the figure
  • Press “Start Localization”

frame_005

54 of 93

Set-up

  • After pressing “Start Localization” you will wait a bit for the program to automatically find the lunar limb.
  • Accurately finding the lunar limb is important for the localization

frame_005

55 of 93

Results of automatically circle fitting

The results

Visual inspection of the results – change color if you want

These results are empty because no focal length was given

Location of the event

56 of 93

Are we satisfied with the suggested lunar limb?

View Circle

View Limb

57 of 93

If no, change parameters of the algorithm

58 of 93

If no, change parameters of the algorithm

59 of 93

Set sd=4 and press Retry

60 of 93

Set sd=6 and press Retry

61 of 93

Set Boost = 1%

62 of 93

Set Boost = 5% -> This is the best result

63 of 93

If you are still not satisfied with the result use Manual Fit

64 of 93

Manual Circle Fitting

65 of 93

Manual Circle Fitting

  • Select Point on the Image
  • Press "Add point"
  • Continue until you have selected enough points
  • Press "Manual Fit"

frame_005

66 of 93

The best result: Set Boost = 5%

  • See "Past attempts"
  • Choose the best fitting circle
  • Press continue
  • Wait a bit

67 of 93

Next Step

  • In this step you must answer two questions:
    • Is the non-sunlit lunar hemisphere the east or the west?
    • Is the image flipped?
  • Use the reference Image to answer these questions

frame_005

68 of 93

Next Step

  • Is the non-sunlit lunar hemisphere the east or the west?
    • West
  • Is the image flipped?
    • No

  • Then press "Continue without automatic rotation"
  • Wait... It will take a while

69 of 93

Next Step:�Automatic Correlation

frame_005

70 of 93

Automatic Correlation

  • The image must be rotated so that Mare Humorum is in the correct spot

frame_005

71 of 93

Suggested rotation

View rotation

View moon

72 of 93

Rotation: -31.53 deg

73 of 93

Mare Humorum is now correctly placed

  • If you are satisfied with the correlation press "Complete Localization"

74 of 93

Results on the event directory:

75 of 93

Results on the event directory:

  • This event was also captured by NELIOTA and we can compare our localization results

76 of 93

Second Event (provided by NELIOTA)

Event from Kryoneri telescope at 2020-06-25 18:28:18

77 of 93

Set-up

  • We will perform the task of localization in an impact flash from Kryoneri telescope at 2020-06-25 18:28:18
  • Choose the folder “FDS_localization_2”

frame_005

frame_005

78 of 93

Set-up

  • Click “Event Localization”
  • Select the Directory of the event
  • Input observatory information as shown in the figure
  • This time, give the focal length of the telescope to calculate the pixel scale
  • Press “Start Localization”

frame_005

79 of 93

Fitting Circle

  • With the pixel scale, a suggested radius is calculated
  • Compare with radius found by circle fitting

frame_005

80 of 93

Next Step

  • Is the non-sunlit lunar hemisphere the east or the west?
    • West
  • Is the image flipped?
    • Yes

frame_005

  • Let's do automatic rotation

81 of 93

Automatic rotation

  • Automatic rotation found a rotation angle of 21.7 degrees

frame_005

82 of 93

Grimaldi crater is correctly matched

83 of 93

Comparing results with NELIOTA

84 of 93

Third Event (provided by NELIOTA)

Event from Kryoneri telescope at 2018-08-08 02:29:44

85 of 93

Set-up

  • We will perform the task of localization in an impact flash from Kryoneri telescope at 2018-08-08 02:29:44
  • Choose the folder “FDS_localization_3”

frame_005

frame_005

86 of 93

Set-up

  • Click “Event Localization”
  • Select the Directory of the event
  • Input observatory information as shown in the figure
  • This time, give the focal length of the telescope to calculate the pixel scale
  • Press “Start Localization”

frame_005

87 of 93

Fitting Circle

  • With the pixel scale, a suggested radius is calculated
  • Compare with radius found by circle fitting
  • Clear image, better results

frame_005

88 of 93

Next Step

  • Is the non-sunlit lunar hemisphere the east or the west?
    • West
  • Is the image flipped?
    • Yes

frame_005

  • This time we will not do automatic rotation

89 of 93

Find the right rotation

  • This time try to find the right rotation
  • Use rotation of 1.2 degrees

frame_005

90 of 93

Shift Horizontal and Vertical

  • Horizontal shift by 6 pixels
  • Vertical shift by 3 pixels

frame_005

91 of 93

Mare Crisium is now correctly placed

  • If you are satisfied with the correlation press "Complete Localization"

92 of 93

Comparing results with NELIOTA

93 of 93

Thanks for your attention