/usr/share/doc/dpuser-doc/examples.html is in dpuser-doc 3.3+p1+dfsg-2build1.
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 | <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Thomas Ott">
<title>DPUSER - The Next Generation: Examples</title>
<style type="text/css" title="currentStyle">
@import "dpuser.css";
</style>
<link rel="shortcut icon" href="dpuser.ico" type="image/xicon">
</head>
<body>
<div id="header">DPUSER - The Next Generation</div>
<div id="menu">
<ul>
<li><a href="index.html">Introduction</a></li>
<li><a href="history.html">History</a></li>
<li><a href="syntax.html">Syntax</a></li>
<li><a href="operators.html">Operators</a></li>
<li><a href="ifandloop.html">Structural commands</a></li>
<li><a href="variables.html">Data types</a></li>
<li><a href="plotting.html">Graphics</a></li>
<li><a href="fitsfiles.html">Fits files</a></li>
<li><a href="category.html">Category index</a></li>
<li><a href="functions.html">Function index</a></li>
<li><a href="procedures.html">Procedure index</a></li>
<li><a href="pgplot.html">Pgplot index</a></li>
<li><a class="current" href="examples.html">Examples</a></li>
<hr>
<li><a href="qfitsview.html">QFitsView documentation</a></li>
<hr>
</ul>
<form method="GET" action="search.html">
<input type="text" size=15 name="keywords">
<input type="submit" value="Search">
</form>
</div>
<div id="content">
<h1>Examples</h1>
In this section, a few examples how to use of DPUSER are given. This very
often is the fastest way to learn how a software package works.
<h3>
Printing the ASCII character set</h3>
Assign the ASCII character set to a string variable and print it out
<blockquote><tt>ascii = ""
// create empty string variable</tt>
<br><tt><a href="ifandloop.html#loops">for</a> (i = 32; i <= 255; i++)
ascii += <a href="function_char.html">char</a>(i) // assign values</tt>
<br><tt>print ascii
// display on screen</tt></blockquote>
<h3>
Getting information on files</h3>
Create a list of files and show their sizes
<blockquote><tt>list = <a href="function_findfile.html">findfile</a>("*.cpp")
// find all C++ files</tt>
<br><tt>size = <a href="function_longarray.html">longarray</a>(<a href="function_nelements.html">nelements</a>(list))
// create matrix for file sizes</tt>
<br><tt>for (i = 1; i <= nelements(list); i++ {</tt>
<br><tt> size[i] = <a href="function_filesize.html">filesize</a>(list[i])
// assign values and print out</tt>
<br><tt> print "file " + list[i] + " has a size of " + size[i] /
1024 + " kB"</tt>
<br><tt>}</tt></blockquote>
<h3>
Reducing speckle data</h3>
This example shows how a standard speckle data reduction could look like.
<blockquote><tt>dark = <a href="function_cubeavg.html">cubeavg</a>('darkcube.fits')
// create dark frame</tt>
<br><tt>sky = cubeavg('sky.fits')
// sky</tt>
<br><tt>dpl = <a href="function_dpixcreate.html">dpixcreate</a>(sky,
5)
// dead pixel list</tt>
<br><tt>dpl[128,*] = 1
// assume 128th row is dead</tt>
<br><tt>flat = <a href="function_dpixapply.html">dpixapply</a>(sky
- dark, dpl) // create flat field</tt>
<br><tt>flat = median(flat) / flat
// take inverse of flat field</tt>
<br><tt>lxp = dpixapply(cubeavg('object.cube') - sky, dpl)</tt>
<br><tt>
// long exposure</tt>
<br><tt>'object.lxp' = lxp
// write lxp to disk</tt>
<br><tt>x = <a href="function_xmax.html">xmax</a>(lxp)</tt>
<br><tt>y = <a href="function_ymax.html">ymax</a>(lxp)
// find position of maximum</tt>
<br><tt>naxis1 = <a href="function_naxis1.html">naxis1</a>(lxp)</tt>
<br><tt>naxis2 = <a href="function_naxis2.html">naxis2</a>(lxp)
// set up global variables</tt>
<br><tt>mask = <a href="function_circle.html">circle</a>(x, y, 20)
// create mask for ssa</tt>
<br><tt>'object.ssa' = <a href="function_ssa.html">ssa</a>('object.cube',
x, y, sky, flat, dpl, mask)</tt>
<br><tt>
// do ssa and write to disk</tt>
<br><tt>x = naxis1 / 2 + 1</tt>
<br><tt>y = naxis2 / 2 + 1
// center of the array</tt>
<br><tt>psf = norm(<a href="function_center.html">center</a>('object.ssa')
* <a href="function_cosbell.html">cosbell</a>(x, y, 5, 20))</tt>
<br><tt>
// Point Spread Function</tt>
<br><tt>'object.wien' = <a href="function_wien.html">wien</a>('object.ssa',
psf) // deconvolve</tt></blockquote>
This standard reduction works fine if the object is dominated by one bright
source. For faint sources or many objects of comparable brightness in the
field of view, a more sophisticated reduction is necessary. See the <a href="function_ssa.html">help
on ssa</a> for more information.
</div>
<div id="copyright">
Copyright © Thomas Ott ---- DPUSER - The Next Generation 3.3 (Rev. )
</div>
</body>
</html>
|