This file is indexed.

/usr/share/doc/munipack/lctut.html is in munipack-doc 0.5.10-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- meta -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="description" content="A general astronomical image processing software">
<meta name="author" content="Filip Hroch">
<link href="news_feed.xml" type="application/atom+xml" rel="alternate" title="Sitewide ATOM Feed" />
<link type="text/css" rel="stylesheet" href="munipack.css">
<link rel="shortcut icon" href="favicon.ico">
<title>Munipack ‒ Light Curve Tutorial</title>
</head>
<body>
<header>
<a href="munipack.html"><img src="title_logo.png" alt="Munipack's logo" class="head"></a>
<div class="headhead">
<div class="headtitle">
<a class="headtitle" href="munipack.html">Munipack</a>
<a class="headsubtitle" href="munipack.html">A general astronomical image processing software</a>
</div>
<ul class="menu">
  <li class="menu"><a href="docs.html" class="menu">Documents</a></li>
  <li class="menu"><a href="guide.html" class="menu">User guide</a></li>
</ul>
</div>
</header>

<h1>Light Curve</h1>

<p class="abstract">
How to extract
a light curve (a time dependence of magnitude) of a variable source.
</p>


<h1>Blazar 0716+714</h1>

<p>
<a href="http://en.wikipedia.org/wiki/Blazar">Blazar</a>
<a href="http://simbad.u-strasbg.fr/simbad/sim-basic?Ident=pks+0716%2B71&amp;submit=SIMBAD+search">0716+714</a>
is a bright quasi-stellar extra-galactic object in Camelopardalis.
The observed light has origin in a
<a href="https://en.wikipedia.org/wiki/Synchrotron_radiation">synchrotron radiation</a>
emitted by relativistics electrons forming a jet.
The jet is oriented directly to the Earth.
A non-periodic light variations can be observed. The origin of the
variations is only partially
<a href="https://en.wikipedia.org/wiki/Relativistic_beaming">understood</a>.
</p>


<h2>Sample Data</h2>

<p>
A sample data are available as
<a href="ftp://munipack.physics.muni.cz/pub/munipack/munipack-data-0716.tar.gz">munipack-data-0716.tar.gz</a>.
</p>

<p>
We are preparing working directory and downloading of data.
It is highly recommended to use
a new empty directory to prevent any losts
(especially of original images!).
Use commands
</p>
<pre>
$ mkdir ~/tmp
$ cd ~/tmp
$ wget ftp://munipack.physics.muni.cz/pub/munipack/munipack-data-0716.tar.gz
$ tar zxf munipack-data-0716.tar.gz
</pre>
<p>
to unpack it to a desired directory in your home.
We will assume that the sample data are unpacked to <samp>~/tmp</samp>
(the name does not matter) directory
as the subdirectory <samp>munipack-data-0716/</samp>.
This tutorial will take about 2GB of disk space.
</p>

<p>
The sample dataset includes an observation of this blazar together
with correction frames (flat-fields and dark-frames). The data has
been acquired at MonteBoo Observatory by Lucie Sixtová.
</p>

<table>
<caption>Data overview</caption>
<tr><th>Description</th><th>Filemask</th><th>Exposure</th></tr>
<tr><td>scientific images</td><td style="text-align:right;"><samp>0716_*[VR].fits</samp></td><td style="text-align:right;">120 sec</td></tr>
<tr><td>dark-frames of scientific images</td><td style="text-align:right;"><samp>d120_*.fits</samp></td><td style="text-align:right;">120 sec</td></tr>
<tr><td>flat-fields</td><td style="text-align:right;"><samp>f30_*[VR].fits</samp></td><td style="text-align:right;">30 sec</td></tr>
<tr><td>dark-frames of flat-fields</td><td style="text-align:right;"><samp>d30_*.fits</samp></td><td style="text-align:right;">30 sec</td></tr>
</table>


<h2>Photometry Pre-processing</h2>

<p>
Prepare corrected data as is described in
<a href="phcorrtut.html">Photometric Corrections Tutorial</a>.
</p>
<pre>
$ munipack dark -o d30.fits d30_*.fits
$ munipack dark -o d120.fits d120_*.fits
$ munipack flat -o f_V.fits -dark d30.fits f30_*V.fits
$ munipack flat -o f_R.fits -dark d30.fits f30_*R.fits
$ munipack phcorr -dark d120.fits -flat f_V.fits 0716_*V.fits
$ munipack phcorr -dark d120.fits -flat f_R.fits 0716_*R.fits
</pre>


<h2>Detection of Stars And The Aperture Photometry</h2>
<p>
For detection and photometry, run the commands:
</p>
<pre>
$ munipack find -f 3 0716_*.fits
$ munipack aphot 0716_*.fits
$ munipack gphot 0716_*.fits
</pre>

<p>
  This routines detect stars on all frames and prepares both aperture
  and growth-curve photometry.
  Results are stored in FITS files with images as an additional part
  (extension).
Backups of original frames are saved with the tilde (~) filename suffix.
</p>

<p>
Stars are modelled as peaks with near-Gaussian profile and the full width
at half of maximum (FWHM) given as a parameter -f. The default value
is suitable for usual optical images.
</p>

<p>
The number of detected stars is affected by <samp>-th</samp> parameter designed as
a threshold over the sky level in sigma-sky values. Default value will
detect faint stars but not the most faint stars. Values under -th 1 will
implicate detection of defects.
</p>

<p>
By default, the first aperture with radius greater than FWHM is used
for subsequent processing.
</p>

<h2>Astrometry Calibration</h2>
<p>
The astrometry calibration will be done with
</p>
<pre>
$ munipack cone -r 0.2 110.5 71.3
$ munipack astrometry -c cone.fits 0716_*.fits
</pre>

<p>
It will run for a while. The routine use detected stars
to determine mutual association (match) between stars on
images and in the catalogue (result of default run of cone
is sample from UCAC4 catalogue). The set of stars establishes
transformation from pixel coordinates to sky coordinates
which is the astrometry calibration.
</p>

<p>
For particular frame, the match sometimes has failed.
This commonly indicates these source of problems: clouds, bad frame, etc.
For example, the processing will report (see affected frames to understand why):
</p>
<pre>
...
=C> Mutual match for files `0716_145R.fits' and `cone.fits' failed.
...
</pre>

<!--
add chapter: where I get the coordinates ?
  * by objects name in Simbad
  * by FITS header
  * Astrometry.net
-->


<!--
<h2>Instrumental Magnitudes</h2>

<p>
Results of photometry is a table added to original frames. The table
contains number of counts determined from every star and  instrumental
magnitudes. To list of the values, use <samp>timeseries</samp>
action. The table contains all detected stars. If one is interested just
in selected stars, the coordinates of sources must be given.
</p>

<pre>
$ munipack timeseries 110.473,71.343 110.389,71.322 110.468,71.305 \
           \-\-stdout 0716_*R_MAG.fits
  2453759.2507523149        20947.582031250000        144.81892395019531        36699.714843750000        191.63452148437500
   2453759.2523263888        21080.164062500000        145.27471923828125        36913.777343750000        192.19430541992188

</pre>

<p>
The table with
Julian days and instrumental magnitudes (and theirs statistical
errors) are final light curves. One will also
print on screen (due <samp>\-\-stdout</samp>) and saved defaulty
to file <samp>timeseries.fits</samp> including detailed  description of quantities.
</p>
-->


<h2>Photometry Calibration</h2>

<p>Photometry calibration is essential for valuable results of light curves.
Photometry precision will be demonstrated on these
<a href="man_phcal.html">calibration methods</a>:
</p>

<ul>
<li>Manual calibration.</li>
<li>Calibration on base of known photometric sequence.</li>
<li>Calibration on base of a photometry catalogue.</li>
<li>Calibration on base of already calibrated frame.</li>
</ul>

<!--<h4>Description Of Common Parameters</h4>-->

<p>
<span class="par">Description Of Common Parameters</span>
There are some important parameters which will commonly used:
</p>

<dl>
<dt><samp>--photsys-ref Johnson</samp></dt><dd> Identifier
  of our photometric system must be provided because it is used
  for computation of <a href="phoverview.html">reference photons</a>.
  In real, used filters are only an good approximation.
</dd>
<dt><samp>-f, --filters</samp></dt><dd> The option sets filter
  of the calibrated frame.
</dd>
<dt><samp>--area 0.3</samp></dt><dd>An approximation of input area
   of the telescope.
</dd>
<dt><samp>-O --mask '\1_cal.\2'</samp></dt><dd>This magic option
   adds suffix to input frame name and set the new name as output.
   The input filename is split
   on part preceding (referenced as \1) and following (\2) the dot.
   We are insert the string _cal between the first and final parts.
   For example, filename <samp>0716_666R.fits</samp> will produce
   \1=0716_666R, \2=fits, so output will be <samp>0716_666R_cal.fits</samp>.
   For details, see <a href="man_com.html#advanced">Advanced Output Filenames</a>.
</dd>
</dl>

<!--<h4>Processing Large Dataset</h4>-->

<p>
<span class="par">Processing Large Dataset</span>
Photometry calibration is implemented for single frames only.
Because typical observation run produces a lot of frames,
shell scripting can help very much. We will use loops
which are coded with command for. Following loop shows
how to print all fits frames in current directory:
</p>
<pre>
for A in *.fits; do
   echo $A
done
</pre>


<h3>Manual Calibration</h3>


<p>
Manual calibration means, that we are specifying directly the
constant <i>r</i> (see <a href="phoverview.html#calibration">Photometry
Calibration</a>). Manual calibration uses provided value without
any changes and computes output quantities like photons.
That mean that user is fully responsible for input values
which affects also results.
</p>

<p>
We will use this method to provide "instrumental quantities"
which has been used by our photometry predecessors. The instrumental magnitudes
will be produced by setting of <i>r</i>=1 (no absolute calibration).
Another choice can approximately fit absolute magnitudes.
For instance, as we will see later, the <i>r</i> is approx 20
and area of telescope is 0.3 m² so <i>r</i>=20/0.3 = 60 will give
approximate good absolute magnitudes.
</p>

<pre>
$ FILTER=V   # also set R
$ for A in 0716_*${FILTER}.fits; do
    munipack phcal -C 1 --photsys-ref Johnson -f ${FILTER} \
        -O --mask '\1_mancal.\2' $A;
  done
</pre>
<p>
(Frames with no astrometry are reported again.)
</p>

<p>
The result instrumental values are not calibrated at all. We will
use it only to construct differential magnitudes.
</p>


<h3>Standard Field As A Catalogue</h3>

<p>
Instrumental magnitudes can be considered as an intermediate product. If
we are preferring calibrated magnitudes, the photometry calibration
must be performed. The calibration determines <i>r</i>
(see <a href="phoverview.html#calibration">Photometry Calibration</a>)
from a set of calibration stars.
</p>

<figure>
<img class="figure" src="0716_map.png" alt="0716+71 map" title="0716+71 identifications">
<figcaption>
Identification chart for stars on field of 0716+71.
</figcaption>
</figure>

<p>
Already calibrated stars must be known before. The most typical situation
is known calibration sequence which had been measured by our predecessors.
For the purpose, we are get the calibration sequence from
<a href="http://www.lsw.uni-heidelberg.de/projects/extragalactic/charts/0716+714.html">Finding Charts for AGN</a> by <a href="http://www.lsw.uni-heidelberg.de/">Landessternwarte Heidelberg-Königstuhl</a> and prepared the file <a href="0716+71.lst">0716+71.lst</a>.
(see also <a href="http://adsabs.harvard.edu/cgi-bin/nph-data_query?bibcode=2001AJ....122.2055G&amp;db_key=AST&amp;link_type=ABSTRACT&amp;high=51e5cff9e708211">González-Pérez et al (2001)</a>). The photometry input catalogue can be created as
</p>
<pre>
$ munipack fits --restore 0716+71.lst
</pre>

<p>
The calibration stars can be used to calibrate of our frames:
</p>

<pre>
$ FILTER=V   # also set R
$ for A in 0716_*${FILTER}.fits; do
      munipack phcal \
        --photsys-ref Johnson --area 0.3 \
        -f ${FILTER} --col-mag ${FILTER} --col-magerr ${FILTER}ERR  \
        -c 0716+71.fits
        -O --mask '\1_catcal.\2'
        $A;
  done
</pre>
<p>
Note, that we are supposed that the filters are exactly in Johnson UBVR(..)
system (<samp>--photsys-ref Johnson</samp>). If the filters are significantly
different, the <a href="colcal.html">transformation table</a> must be applied
on instrumental data.
</p>

<h3>UCAC4 As A Catalogue</h3>

<p>
  There is only one catalogue which covers whole sky with photometry
  measurements in magnitudes in BV (Johnson) and gri (Bessel) filters:
 <a href="http://cdsarc.u-strasbg.fr/viz-bin/Cat?I/322">UCAC4</a> catalogue.
</p>

<p>
There is way how to use UCAC4 on calibration:
</p>
<pre>
$ FILTER=V   # also set R
$ for A in 0716_*${FILTER}.fits; do
     munipack phcal \
       --photsys-ref Johnson --area 0.3 \
       -f ${FILTER} --col-mag ${FILTER}mag --col-magerr e_${FILTER}mag  \
       -c cone_Johnson.fits \
       -O --mask '\1_ucacal.\2' \
       $A;
  done
</pre>



<h3>Reference Frame</h3>

<p>
As the reference, we are using our frame. The approach will give
the most precise results for relative photometry. An systematic
offsets can be supposed in absolute calibration.
</p>

<pre>
$ FILTER=V   # also set R
$ for A in 0716_*${FILTER}.fits; do \
      munipack phcal \
        --photsys-ref Johnson --area 0.3 \
        -f ${FILTER}  \
        -r 0716_006${FILTER}_catcal.fits -O --mask '\1_refcal.\2' $A;
  done
</pre>



<h2>Light Curves</h2>


<p>
The frames are calibrated in photons. The standard magnitudes can be get
with different choices of filters V,R and calibration types (manual,
catalogue,reference frame):
</p>
<pre>
$ munipack timeseries 110.473,71.343 110.389,71.322 110.468,71.305 \
            -c MAG,MAGERR -o mancal_R.fits  0716_*R_mancal.fits
</pre>

<figure>
<img src="lc0716_V.svg" alt="Light Curve of 0716+71" title="Light Curve of 0716+71">
<figcaption>
Light curve of 0716+71 determined by various methods.
Ones for standard field and UCAC4 are shifted for ±0.1 magnitude.
</figcaption>
</figure>

<figure>
<img src="comp0716_V.svg" alt="Light Curve of a comparison star"
     title="Light Curve of a comparison star">
<figcaption>
Light curve of calibration star A (difference is plotted for A and B
     with added constant).
Ones for standard field and UCAC4 are shifted for ±0.1 magnitude.
</figcaption>
</figure>

<h2>Conclusions</h2>

<p>
Light curves of 0716+71 exhibits these properties:
</p>
<ul>
<li>Instrumental calibration, by using of a constant, produces
results strongly depending on observation conditions.
In the graph, the offset 4.5 was added (which is equivalent to
use of <samp>-C 20 --area 0.3</samp>, see CTPH keyword in FITS files *_catcal).
This calibration can't be reccomended for additional processing by any way.
</li>
<li>Other kinds of calibrations gives consistent results
    within their statistical errors. Features:
    0.25-0.5 (brightnening of blazar), 0.42, 0.57, above 0.65 (clouds).</li>
<li>Light curve with minimal noise is produced by (carefully) selecting
of reference frame.</li>
<li>The precision of UCAC4 is significantly lower than both the reference
frame and the standard field.</li>
<li>Points with large differences are due to clouds and other instrumental
problems (inspect the frames visually).</li>
</ul>


<p>
Light curves of calibration stars exhibits another properties:
</p>
<ul>
<li>The differential magnitude successfully suppress large
changes in extinction due to clouds because both the stars are
attenuated by the similar way.</li>
<li>The reference frame again offers the best results because
one much more better suppress potential deviations (clouds, flat-fields
imperfections, etc.) thansk to averaging more objects. Some trends,
perhaps due to colour extinction, are still visible </li>
<li>The variations in light curves on level of a few hundredth
are significant. The change in blazar flux can be declared as real.</li>
<li>The strongly deviated measurements are due seriously
bad frames.</li>
</ul>


<h2>Tips</h2>
<ul>
<li>
The approach can be generalized for any objects exhibiting similar light variations
as variable stars, exoplanets, etc
</li>
<li>Object coordinates can be specified also in
    a <a href="man_timeseries.html">table</a>.</li>
<li>
Parameter <samp>-T phase --epoch 2453759 --period 1.0</samp> can be used to generate
phase curve.
</li>
<li>
The best way to get calibrated magnitudes is to prepare
own photometry catalogue as the average of all frames.
</li>
</ul>

<h2>See Also</h2>

<p>
Manuals:
<a href="man_timeseries.html">Timeseries</a>,
<a href="man_astrometry.html">Astrometry</a>,
<a href="man_aphot.html">Aperture Photometry</a>,
<a href="man_phcal.html">Photometry Calibration</a>,
<a href="man_phcorr.html">Photometric corrections</a>.<br>
Data Formats:
<a href="dataform_tmseries.html">Time Serie Tables</a>.<br>
<a href="lctut.sh">lctut.sh</a> is a bash script summarizing
of this tutorial,
<a href="ucac_jmuc.py">ucac_jmuc.py</a> is Python utility (requires
<a href="http://www.astropy.org/">Astropy</a>) which converts UCAC4
   r,i magnitudes in Gunn to R,I Johnson photometry system.
</p>


<footer>
<div style="float:left; margin-left:2em;">
Copyright &copy; 1997 – 2018
Filip Hroch (<a style="text-decoration: none" href="mailto:hroch@physics.muni.cz?Subject=Munipack" title="Author's Email"></a>), license <a href="http://www.gnu.org/licenses/gpl.html">GPLv3</a>.
</div>
<div style="float:right; margin-right:2em; margin-top:-0.2em;">
<a href="http://monteboo.blogspot.com/search/label/Munipack" title="Munipack on MonteBoo Blog"><img src="favicon-blogger.png" alt="Blogger"></a>
<a href="http://www.muni.cz/?lang=en" title="Masaryk University in Brno, Czech Republic"><img src="mu-logo.png" alt="Masaryk University"></a>
<a href="news_feed.xml" title="Munipack's Releases in Atom Syndication Format"><img src="Feed-icon.png" alt="Atom Feed"></a>
</div>
</footer>

</body>
</html>