cta data processing - tuxfamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016....

78
Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References CTA Data Processing Image cleaning benchmark er´ emie Decock CEA Saclay - Irfu/SAp October 23, 2016 Decock CEA Saclay - Irfu/SAp CTA Data Processing

Upload: others

Post on 20-Jan-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

CTA Data ProcessingImage cleaning benchmark

Jeremie Decock

CEA Saclay - Irfu/SAp

October 23, 2016

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 2: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Baseline

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 3: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Baseline

Subject

How to assess image cleaning algorithms ?

(preprocessing for Hillas parametrization)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 4: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Baseline

BaselineAlgorithms for image cleaning

So far, 3 algorithms:

I “Tailcut”

I DFT

I Wavelet Transform

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 5: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Baseline

BaselineCleaning algorithms evaluation

Evaluations based on MC simulations (gamma photons only):

1. The mean distance of normalized “cleaned” images to the actualnormalized “clean” images (i.e. images without NSB andinstrumental noise)

2. The mean distance of Hilas parameters computed on “cleaned”images to those computed on the actual “clean” images

3. The mean distance of events features (position and energy)computed on “cleaned” images to those given to simulations

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 6: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

MonteCarlo simulations

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 7: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Introduction

MC simulations

We need MC simulations to assess algorithms:

I So far, the priority is to make the dataset for the benchmarkI We can run MC simulations with Corsika/SimtelArray

I The procedure is detailed on the SAp CTA wiki:https://dsm-trac.cea.fr/cta/wiki/SAp

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 8: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

Corsika/SimtelArray configuration

“CTA Prod3 demo” configuration

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 9: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configuration

I “CTA Prod3 demo”configuration

I 125 telescopesI Location: Paranal, Chile

(altitude: 2150m)

I Cosmic rays: gammaphotons

I Source: (20deg, 180deg)

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 10: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationLSTCam

I Telescopes 1 to 4

I ? (hexagonal) pixels

I Optical focal length: ?m

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.5

1.0

0.5

0.0

0.5

1.0

1.5

Y p

osi

tion (

m)

CT001, event 05007

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 11: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationNectarCam

I Telescopes 5 to 16

I ? (hexagonal) pixels

I Optical focal length: ?m

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.5

1.0

0.5

0.0

0.5

1.0

1.5

Y p

osi

tion (

m)

CT005, event 05007

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 12: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationFlashCam telescopes

I Telescopes 17 to 28

I 1764 (hexagonal) pixels

I Optical focal length: 16.0m

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.0

0.5

0.0

0.5

1.0

Y p

osi

tion (

m)

CT017, event 02005

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 13: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationASTRI telescopes

I Telescopes 29 to 52

I 2368 (rectangular) pixels

I Optical focal length: 2.15m

0.3 0.2 0.1 0.0 0.1 0.2 0.3X position (m)

0.2

0.1

0.0

0.1

0.2

Y p

osi

tion (

m)

CT029, event 08211

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 14: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationGATE

I Telescopes 53 to 76

I ? (rectangular) pixels

I Optical focal length: ?m

0.2 0.1 0.0 0.1 0.2X position (m)

0.20

0.15

0.10

0.05

0.00

0.05

0.10

0.15

0.20

Y p

osi

tion (

m)

CT053, event 03700

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 15: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationSST-1m

I Telescopes 77 to 101

I ? (hexagonal) pixels

I Optical focal length: ?m

0.6 0.4 0.2 0.0 0.2 0.4 0.6X position (m)

0.4

0.2

0.0

0.2

0.4

Y p

osi

tion (

m)

CT077, event 00207

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 16: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Prod3

“CTA Prod3 demo” configurationSCTCam

I Telescopes 102 to 125

I ? (rectangular) pixels

I Optical focal length: ?m

0.6 0.4 0.2 0.0 0.2 0.4 0.6X position (m)

0.4

0.2

0.0

0.2

0.4

Y p

osi

tion (

m)

CT102, event 05912

1500 1000 500 0 500 1000 1500

x position (m)

1500

1000

500

0

500

1000

1500

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 17: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

Corsika/SimtelArray configuration

“ASTRI mini-array” configuration

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 18: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

“ASTRI mini-array” configuration

I 38 telescopesI 33 ASTRI telescopesI 5 FlashCam telescopes

I Events:I 40204 γ-raysI 7580 protons

I γ-rays and protons arestored in separate files

400 300 200 100 0 100 200 300 400

x position (m)

400

300

200

100

0

100

200

300

400

y p

osi

tion (

m)

1

2 3 4

5 6

7 8 9

10 11 12

13 14

15 16 17

18 19 20

21 22

23 24 25

26 27 28

29 30

31 32 33

34 35

36 37

38

Telescopes position

Simtel files are available on sapcta at

/dsm/manip/cta/DATA/astri mini array/

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 19: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

“ASTRI mini-array” configurationASTRI telescopes

I Telescopes 1 to 33

I 2368 (rectangular) pixels

I Optical focal length: 2.15m

0.3 0.2 0.1 0.0 0.1 0.2 0.3X position (m)

0.2

0.1

0.0

0.1

0.2

Y p

osi

tion (

m)

CT029, event 08211

400 300 200 100 0 100 200 300 400

x position (m)

400

300

200

100

0

100

200

300

400

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 20: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

“ASTRI mini-array” configurationFlashCam telescopes

I Telescopes 34 to 38

I 1764 (hexagonal) pixels

I Optical focal length: 16.0m

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.0

0.5

0.0

0.5

1.0

Y p

osi

tion (

m)

CT017, event 02005

400 300 200 100 0 100 200 300 400

x position (m)

400

300

200

100

0

100

200

300

400

y p

osi

tion (

m)

Telescopes position

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 21: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

MC simulations“ASTRI mini-array” configuration

Number of events per simtel files:File Num. events

gamma/run 1001.simtel.gz 4461gamma/run 1002.simtel.gz 4567gamma/run 1003.simtel.gz 4425gamma/run 1004.simtel.gz 4401gamma/run 1005.simtel.gz 4451gamma/run 1006.simtel.gz 4451gamma/run 1007.simtel.gz 4614gamma/run 1008.simtel.gz 4423gamma/run 1009.simtel.gz 4411

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 22: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

MC simulations“ASTRI mini-array” configuration

Number of events per simtel files:File Num. events

proton/run 10000.simtel.gz 747proton/run 10001.simtel.gz 680proton/run 10002.simtel.gz 763proton/run 10003.simtel.gz 792proton/run 10004.simtel.gz 763proton/run 10005.simtel.gz 776proton/run 10006.simtel.gz 738proton/run 10007.simtel.gz 749proton/run 10008.simtel.gz 760proton/run 10009.simtel.gz 812

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 23: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

“ASTRI mini-array” configurationPhotons gamma

1.0 0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0log10(E/TeV)

103

104

0.6 0.4 0.2 0.0 0.2 0.4 0.6azimuth / rad

0

5000

10000

15000

20000

25000

30000

35000

40000

45000

0.6 0.8 1.0 1.2 1.4 1.6 1.8altitude / rad

0

5000

10000

15000

20000

25000

30000

35000

40000

45000

0 5 10 15 20 25 30 35 40

NTeltrig

102

103

104

1000 500 0 500 1000xcore

1000

500

0

500

1000

y cor

e

400 300 200 100 0 100 200 300 400xtel

400

300

200

100

0

100

200

300

400

y tel

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 24: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

ASTRI mini-array

“ASTRI mini-array” configurationProtons

1.0 0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0log10(E/TeV)

102

103

0.4 0.3 0.2 0.1 0.0 0.1 0.2 0.3 0.4azimuth / rad

0

200

400

600

800

1000

1200

1400

1.10 1.15 1.20 1.25 1.30 1.35altitude / rad

0

200

400

600

800

1000

1200

1400

0 5 10 15 20 25 30 35 40

NTeltrig

102

103

1500 1000 500 0 500 1000xcore

1500

1000

500

0

500

1000

1500

y cor

e

400 300 200 100 0 100 200 300 400xtel

400

300

200

100

0

100

200

300

400

y tel

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 25: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 26: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

First benchmark methodThe mean distance of normalized images

The error function E is given by:

E(s, s∗) = |ϕ(s)− ϕ(s∗)|

Where:

I s is the output image (the ”cleaned” image) ∈ IRd

I s∗ is the reference image (the ”clean” image) ∈ IRd

I ϕ is a normalization function

ϕ(s) =s−min(s)

max(s)−min(s)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 27: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

First benchmark methodThe mean distance of normalized images

The reference image s∗ is the best expected “cleaned” image, i.e.s∗ is the raw input image s without:

I the instrumental noise

I the background noise

How do we get it from simulations ?

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 28: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

First benchmark methodThe mean distance of normalized images

We simply use photoelectron images

Each image s in simtelarray files have an equivalent photoelectronimage that we use as reference s∗

In ctapipe:

I s := event.dl0.tel[tel id].adc sums[channel]

I s∗ := event.mc.tel[tel id].photo electrons

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 29: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

First benchmark methodThe mean distance of normalized images

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.0

0.5

0.0

0.5

1.0

Y p

osi

tion (

m)

CT021, event 02711

1600

1800

2000

2200

2400

2600

2800

3000

3200

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.0

0.5

0.0

0.5

1.0

Y p

osi

tion (

m)

CT021, event 02711

0

2

4

6

8

10

12

14

16

Figure: An example of input image s (left) and the correspondingreference image s∗ (right)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 30: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

Second benchmark methodThe mean distance of Hillas parameters

The error function E is given by:

E(s, s∗) = |H(s)− H(s∗)|

Where:

I H(s) returns the vector of Hillas parameters of s

I s is the output image (the ”cleaned” image) ∈ IRd

I s∗ is the reference image (the ”clean” image) ∈ IRd

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 31: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Benchmark

Optimize cleaning algorithms parameters

For each image cleaning algorithm f , compute its optimalparameter η∗ on a training set of simulations

η∗ = arg minη

[Eκ,Ω (E(s, s∗))]

s = fη(s)

s∗ = MC(κ,ωshower )

s = s∗ + ωNSB(.) + ωinstrument(.)

Ω := (ωshower ,ωNSB ,ωinstrument)

with MC the simulation function, κ simulations parameters and Ωrandom variables.

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 32: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Toolchain

Workflow

Simtel file

Extract images(extract_crop_and_plot_all_astri_images.sh)

MC simulations(Corsika/SimtelArray)

Fits file 1 Fits file 2 Fits file N...

Assess(datapipe/denoising/*.py)

Result file

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 33: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Results

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 34: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Results

Score

ASTRI mini-array on sapcta

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 35: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Results

First benchmark method(Very) early results

0 1 2 3 4 5 6 7 8

Score 1e 1

0

1

2

3

4

5

6

7

8

9

Count

1e3 Score

FFT

Tailcut

Wavelets

0 1 2 3 4 5

Score 1e 2

0.0

0.5

1.0

1.5

2.0

Count

1e3 Score

FFT

Tailcut

Wavelets

I ASTRI mini-array (uncalibrated data) - Telescopes 1 to 9 only

I Non-optimal parameters (quickly and poorly chosen)

I Polychromatic event set

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 36: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Results

First benchmark method(Very) early results

0 1 2 3 4 5 6 7 8

Score 1e 1

0

1

2

3

4

5

6

7

8

9

Count

1e3 Score

FFT

Tailcut

Wavelets

0 1 2 3 4 5

Score 1e 2

0.0

0.5

1.0

1.5

2.0

Count

1e3 Score

FFT

Tailcut

Wavelets

I Tailcut: JD’s implementationI FFT: Numpy implementationI Wavelets: Cosmostat Sparce2D (mr transform) b-Spline wavelet transform

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 37: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Results

First benchmark method(Very) early results

0 1 2 3 4 5 6 7 8

Score 1e 1

0

1

2

3

4

5

6

7

8

9

Count

1e3 Score

FFT

Tailcut

Wavelets

0 1 2 3 4 5

Score 1e 2

0.0

0.5

1.0

1.5

2.0

Count

1e3 Score

FFT

Tailcut

Wavelets

I Hardware: Intel 24 cores @ 2.0GHz (unknown model - KVM) - 32Go

I Input files: sapcta:/dsm/manip/cta/DATA/astri mini array/fits/gamma/

I Num samples: 12016 images

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 38: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeTime constraints

The official trigger rate in CTA North is 30000s−1 (source TDR)

Thus 30 microseconds are available to have the event denoised anda rough reconstruction performed

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 39: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution time

Prod3 demo on laptop (MacBook Pro)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 40: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeMeasurements (MacBook Pro 9,2)

0 1 2 3 4 5

Execution time (seconds) 1e 1

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

1.6

Count

1e2 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 3

0

1

2

3

4

5

6

7

Count

1e1 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.5 1.0 1.5 2.0 2.5 3.0

Execution time (seconds) 1e 4

0

1

2

3

4

5

6

7

Count

1e1 Execution time

30 µs

FFT

Tailcut

Wavelets

I Hardware: Intel Core i7 Ivy Bridge @ 2.9GHz - 8Go DDR3 1600MHz

I Input files: “Prod3 demo / Sim 13” (not shared)

I Num samples: 241 images

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 41: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution time

ASTRI mini-array on sapcta

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 42: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeMeasurements (sapcta)

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 1

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

Count

1e4 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 3

0

1

2

3

4

5

6

Count

1e3 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5

Execution time (seconds) 1e 4

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

Count

1e3 Execution time

30 µs

FFT

Tailcut

Wavelets

I ASTRI mini-array (uncalibrated data)

I Telescopes 1 to 9 only

I Polychromatic event set

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 43: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeMeasurements (sapcta)

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 1

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

Count

1e4 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 3

0

1

2

3

4

5

6

Count

1e3 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5

Execution time (seconds) 1e 4

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

Count

1e3 Execution time

30 µs

FFT

Tailcut

Wavelets

I Tailcut: JD’s implementation

I FFT: Numpy implementation

I Wavelets: Cosmostat Sparce2D (mr transform) b-Spline wavelet transform

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 44: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeMeasurements (sapcta)

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 1

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

Count

1e4 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.2 0.4 0.6 0.8 1.0

Execution time (seconds) 1e 3

0

1

2

3

4

5

6

Count

1e3 Execution time

30 µs

FFT

Tailcut

Wavelets

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5

Execution time (seconds) 1e 4

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5

Count

1e3 Execution time

30 µs

FFT

Tailcut

Wavelets

I Hardware: Intel 24 cores @ 2.0GHz (unknown model - KVM) - 32Go

I Input files: sapcta:/dsm/manip/cta/DATA/astri mini array/fits/gamma/

I Num samples: 12016 images

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 45: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeMeasurements (sapcta)

FFT Tailcut Wavelets10-5

10-4

10-3

10-2

10-1

100Execu

tion t

ime (

seco

nds)Execution time

30 µs

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 46: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeAxis of improvement

I Check execution time on sapcta [ok]

I Check execution time of mr recons and mr filter

I Use mr transform as a library [work in progress]

I Compile mr transform with the best optimization flagsI Use fast linear algebra libraries in Sparce2D (like Blas)

I Compare Blas, Eigen, ...I Test Blas with GPGPU ?

I Use OpenMP in Sparce2D (e.g. parallelize planes making)

I Check some other wavelet function (default=2 bspline WT)

I Check some other library

I Check FWT (Fast Wavelet Transform) algorithm ?

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 47: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeA more accurate measurement for wavelets

415 s t r u c t t i m e v a l t i m e v s t a r t 1 , t imev end , t i m e v d i f f 1 ;416417 // S t a r t benchmark he r e418 g e t t i m e o f d a y (& t i m e v s t a r t 1 , NULL) ;419420 // Perform the t r a n s f o rma t i o n421 MR Data . t r a n s f o r m ( Dat ) ;422423 // Stop benchmark he r e424 g e t t i m e o f d a y (& t imev end , NULL) ;425 t i m e r s u b (& t imev end , &t i m e v s t a r t 1 , &t i m e v d i f f 1 ) ;426 f p r i n t f ( s t d o u t , ”DELTATIME1 %l d .%06 l d\n” ,427 t i m e v d i f f 1 . t v s e c , t i m e v d i f f 1 . t v u s e c ) ;

sapcta:/dsm/manip/cta/bin/ISAP V3.1/cxx/sparse2d/src/mr transform.cc

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 48: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeA more accurate measurement for wavelets

0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5

Execution time (seconds) 1e 4

0.0

0.5

1.0

1.5

2.0

2.5

3.0

3.5

4.0

4.5C

ount

1e3 Execution time

30 µs

Tailcut

Wavelets (C++)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 49: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Execution time

Execution timeA more accurate measurement for wavelets

FFT Tailcut Wavelets Wavelets (C++)10-5

10-4

10-3

10-2

10-1

100Execu

tion t

ime (

seco

nds)Execution time

30 µs

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 50: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

External papers

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 51: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Papers

“Hadron suppression using Wavelet Transformations for theH.E.S.S. Telescope system” (2002, Stefan Funk)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 52: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperSubject

I Uses Wavelets for γ-ray/hadron separation

I Mention a little bit image cleaning but no experiments(e.g.section 3.3 and conclusion)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 53: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperMethodology

1. Add margins on the input image

2. Map the orthogonal camera coordinates into a hexagonalcoordinate system

3. Apply the hexagonal wavelets to the hexagonal grid ; getwavelets coefficients for each scale

4. Compute the standard deviation of wavelet coefficients foreach plane

5. Give these moments to the neural network used todiscriminate γ-rays to hadrons (in addition to Hillasparameters)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 54: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperBaseline

I Neural Network with Hillas parameters as input

I Neural Network with Hillas parameters + Wavelet coefficientsmoments as input

The neural network is a Feed Forward Neural Network with 2hidden layers (i.e. 4 layers in total)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 55: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperBaseline

Topologies of the used artificial neural networks (Table 3.1)Name NN topology (I-H-H-O)

wave6net 7 - 13 - 5 - 1wave8net 9 - 15 - 5 - 1hillnet 9 - 11 - 5 - 1hillwave6net 11 - 17 - 5 - 1hillwave8net 13 - 19 - 5 - 1hillpointnet 6 - 12 - 8 - 1hillwave6pointnet 12 - 16 - 8 - 1hillwave8pointnet 14 - 18 - 8 - 1

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 56: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperBaseline

Input parameters for the different neural networks: see Table 3.2

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 57: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperData

I Showers simulated with Corsika

I Between 100 GeV to 20 TeV for γ-rays

I Between 300 GeV to 30 TeV for protons

I Zenith angles: 0, 20 and 40 degree

I 3 classes of events to discriminate:

I γ-raysI Isotropical protons (simulate a single telescope system)I Point source protons (simulate stereoscopy)

I Nearly 15000 events simulated per class (nearly 5000 for each zenithangle)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 58: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperData

Input images:

I 960 pixels

I 32x32 hexagonal grid enlarged to 64x64 and 256x256hexagonal grid

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 59: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperResults

Hexagonal wavelets vs orthogonal wavelets:

I Hexagonal wavelets are OK

I “nearly no anisotropies between hexagonal wavelets andorthogonal wavelets”

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 60: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperResults

Classification one large scales (planes 0, 1, 2):I Can easily discriminate:

I isotropically arriving protonsI point source protons

I Can’t easily discriminate:I point source protonsI γ-ray sources

Classification one small scales (planes 4, 5, 6, 7):I Can easily discriminate:

I protonsI γ-rays

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 61: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperResults

Isotropically arriving protons:

I γ/hadron discrimination quality factor increase up to 80%with Wavelets

Point source protons:

I γ/hadron discrimination quality factor increase by nearly 10%only with Wavelets

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 62: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperExecution time

Execution time on a Pentium III @ 800MHz (c.f. p.50):

I 64x64 pixels: 35Hz (28 ms/image)

I 256x256 pixels: 1.5Hz (666 ms/image)

16 times more pixels → 24 times more time

TODO

I What is the complexity class (i.e. computation time withrespect to inputs) of Wavelets Transforms ?

I O(n) for Fast Wavelets Transform (versus O(n log2(n)) forFFT) ?

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 63: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperImplementation

Why does this work is not used in the HESS project ?

I Because this thesis has been written too late (the year HESSwent into operation) ?

I Because the execution time is not compatible with the triggerrate ?

I Other reasons ?

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 64: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperDiscussion

I Point source protons vs isotropical protons: point sourceprotons have additionnal Hillas parameter (impact pointsource) which is very discriminative

I Influence of zenith angle: high zenith angle ← more energy ←protons produces more subshowers (more discriminative)

I

I

I

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 65: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperIdeas

I Use directly second order moments of the Wavelet coefficientsdistribution as an input of the classifier in addition to theHillas parameters

I To shorten computation time: S.Funk suggest to applymulti-scale analysis only to small scales (“scales 4 to 7”)

I To “minimize boundary effects”: add margins to the image(multiply the size of the image by 2 to 16 on each dimension)

I In section 3.3 – about image cleaning (not experimented) –S.Funk applies the same threshold to each plane

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 66: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Stefan Funk

Stefan’s PaperQuestion

I What values are used in image margins ? Random values ?Which distribution ? Fixed values ? 0 ?

I How NN are trained ? Batch method ? Iterative method ?

I What is the stopping criteria ?

I Does results have been obtained with only one run ? Whatabout stochasticity ?

I The dataset seems to small to avoid cross validation.

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 67: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Conclusion

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 68: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Work in progress and TODOs

Work in progress and TODOs

I Get actual “clean” images [ok]

I Make an initial dataset [work in progress]:

I Manage hexagonal pixels and non rectangular camera shapes[ok]

I Calibrate telescopes [work in progress]I Run sanity checks on MC simulations [work in progress]

I Implement the 1st benchmark method [ok]

I Implement the 2nd benchmark method

I Optimize cleaning algorithms parameters

I Improve execution time for wavelet transforms (30 µs)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 69: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Work in progress and TODOs

IssuesFirst benchmark method

Normalization function used in the first benchmark method

ϕ(s) =s−min(s)

max(s)−min(s)

Issue with this normalization functionOutliers may significantly change E(s, s∗).

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 70: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Work in progress and TODOs

IssuesA possible solution to improve the first benchmark method

Replace:E(s, s∗) = abs(ϕ(s)− ϕ(s∗))

with:

E1(s, s∗) = abs

(s∑i si− s∗∑

i s∗i

)

E2(s, s∗) = abs

(∑i

si −∑i

s∗i

)E(s, s∗) = (E1(s, s∗), E2(s, s∗))T

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 71: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Work in progress and TODOs

IssuesASTRI mini-array simulations

0.2 0.1 0.0 0.1 0.2X position (m)

0.2

0.1

0.0

0.1

0.2

Y p

osi

tion (

m)

Telescope 001

951

954

957

960

963

966

969

972

975

978

981

1.5 1.0 0.5 0.0 0.5 1.0 1.5X position (m)

1.0

0.5

0.0

0.5

1.0

Y p

osi

tion (

m)

Telescope 034

2400

2420

2440

2460

2480

2500

2520

2540

Pedestal:

I The pedestal seems very weird for all ASTRI telescopes: [971,961, 971, 961, ..., 971, 961, 971, 961]

I Other telescopes seems OK

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 72: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Work in progress and TODOs

IssuesASTRI mini-array simulations

FWI (for debug), the ADC is probably computed insim telarray/common/sim signal.c at lines 1247 and 1260(function create pm signals):

1247 s i g n a l = ( i n t ) ( ch−>s e n s i t i v i t y [ i c h a n ]∗1248 r a w s i g n a l [ i b i n ] + ch−>p e d e s t a l [ i c h a n ] + p e d e s t a l s y s o f f ) ;

listings/sim signal.c

I guess:

I signal := ADC

I sensitivity := gain

I rawsignal := PE

What is the difference between pedestal and pedestal sysoff ?

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 73: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Work in progress and TODOs

IssuesHillas parameters in ctapipe: bug ?

41 # INIT PLOT #############################################################4243 x , y = e v e n t . meta . p i x e l p o s [ t e l n u m ]44 f o c l e n = e v e n t . meta . o p t i c a l f o c l e n [ t e l n u m ]45 geom = c t a p i p e . i o . CameraGeometry . g u e s s ( x , y , f o c l e n )4647 d i s p = c t a p i p e . v i s u a l i z a t i o n . CameraDisp lay ( geom , t i t l e = ’CT%d ’ % t e l n u m )4849 # GET PHOTOELECTRON IMAGE (CLEAN IMAGE) #################################5051 d i s p . image = e v e n t . mc . t e l [ t e l n u m ] . p h o t o e l e c t r o n s5253 # COMPUTE HILLAS PARAMETERS #############################################5455 image = d i s p . image . copy ( )56 h i l l a s = h i l l a s p a r a m e t e r s ( geom . p i x x , geom . p i x y , image )5758 # PLOT ##################################################################5960 d i s p . s e t l i m i t s p e r c e n t ( 7 0 )61 d i s p . o v e r l a y m o m e n t s ( h i l l a s , l i n e w i d t h =3, c o l o r= ’ b l u e ’ )62 p l t . show ( )

listings/plot events photoelectron image hillas.py

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 74: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Annexes

Tools and Documents

I Ctapipe: https://github.com/cta-observatory/ctapipe

I PyHessio: https://github.com/cta-observatory/pyhessio

I Cosmostat tools (iSAP/Sparse2D):http://www.cosmostat.org/software/isap/

I My scripts to manage simtel files:https://github.com/jdhp-sap/snippets

I My image cleaning scripts: https://github.com/jdhp-sap/

data-pipeline-standalone-scripts

I Tino’s scripts: https://github.com/tino-michael/tino_cta

I My other related presentations:https://github.com/jdhp-sap-docs

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 75: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

References I

Stefan Funk, Hadron suppression using wavelet transformationsfor the hess telescope system, Master’s thesis, 2002.

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 76: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Draft

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 77: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

First benchmark method (bis)The mean distance ratios of images

The error function E is given by:

E(s, s∗) = mean

(abs(s− s∗)

s∗

)(well of course it have to be adapted to avoid div by 0...)

Decock CEA Saclay - Irfu/SAp

CTA Data Processing

Page 78: CTA Data Processing - TuxFamilydownload.tuxfamily.org/jdhp/pdf/cta_data_pipeline_image... · 2016. 10. 23. · Baseline MonteCarlo simulations Benchmark Results External papers ConclusionReferences

Baseline MonteCarlo simulations Benchmark Results External papers Conclusion References

Second benchmark method (bis)Take into account the energy level

The error function E is given by:

Λ ∼ Xη(s, s∗).K(E ,E )

X '∑i

(si − s∗i )2

K '√

(∑

i si −∑

i s∗i )2∑i s∗i

Decock CEA Saclay - Irfu/SAp

CTA Data Processing