You can read this manual sequentially, beginning at section Preliminary Information. If you want to know your rights you can also read the following GNU General Public License. If you also want to know your human rights you can visit http://www.unhchr.ch/udhr/index.htm.
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
NO WARRANTY
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does. Copyright (C) 19yy name of author This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.
The srf2radi
program computes and outputs a look-up table (LUT) of
temperature and band integrated radiance related data for any sensor
with a known response function.
Standard input must be a recognizable Sensor Response Function (SRF) (see section Format of Input SRF), and LUT is given at standard output (see section Format of Output LUT). The program will be useful for thermal infrared sensors since the LUT include temperature, but it can be used with any sensor.
srf2radi
was written by Conrado Badenas.
Although you still do not know how this program works, and why you should
use it, here you have some examples of running srf2radi
. By
making variations on the examples you can play with srf2radi
although
you do not know what you are doing. To know it, read following chapters.
This is the output of the command `srf2radi' on a 60-columns terminal:
Version: 0.18 Usage: srf2radi temp_0 [temp_n num_gaps] { [--verbose] | [-- Verbose] } [<srf_file] [>radi_file]
This is the output of the command `srf2radi 200 300 1 <n16avhr4.srf':
200.0000000000000 12.55853469072980 0.4138510046 749104 300.0000000000000 114.1705586150528 1.6942935186 00035
This is the output of the command `srf2radi 273.15 --verbose <n16avhr4.srf':
273.1500000000000 73.78698503485649 1.3145673911 89101 1 917.9452407357154 4.868067754459915e-1 7
Sensor Response Function
data are read into memory with function
load_srf
defined in file
`snsrspfn.c'. This function currently
supports two types of
SRF files: with
wavenumbers in @elevate{cm,-1}, and with
wavelengths in @microm{}. In order to distinguish between both types,
first line of the file should start with
`cm-1' or
`micro-m', respectively. Moreover, the first line can also contain
specific values for
radiative constants @mathmode{C_1} and @mathmode{C_2} used in
Planck's function, and their relative uncertainties. In case these data are
supplied, they must be included as token=value, where token can be
`c1',
`c2',
`e1' or
`e2'. Default values computed with data from
http://www.physics.nist.gov/constants are used for radiative
constants not specified in the SRF's first line.
At the other line(s) there should be pairs of wavenumber (wavelength) - response data. The wavenumbers (wavelengths) should be monotonic, either increasing or decreasing. The response data can be given in any unit (per cent, per one, ...) since only the shape of SRF is significant. Nevertheless, all the responses should be given in the same units. For `cm-1' type of file these pairs could be `800 0.0 810 80.1 820 99.9 830 72.3 840 0.0', and for `micro-m' these could be `10 0.0 10.5 0.78 11 1.00 11.5 0.86 12 0.0'. Values can be separated with any kind of blanks and newlines. Numbers should be written in any understandable floating point representation.
Function load_srf
reads pairs of data within an infinite loop. The loop
is broken when no more pairs can be read. This is supposed to be caused by
the end of the SRF file or to bad-typed floating point data. In any case, no
error message appears. Please, note that it is not a bug: it is a feature.
With this feature you could input `cm-1RET800 0 850 100 900 0
endRET' as your SRF without having to use an
End Of File (EOF) mark for standard input. In
bash
EOF mark is obtained by presing Ctrl-d.
The SRF is a mathematical function, which is zero out of its domain, and is sparsely known on its domain. It is necessary to set a zero response for the first and last wavenumbers (wavelengths) in order to strictly follow the definitions of SRF and SRF domain. The program rejects the SRFs which have non-zero responses at the edges of SRF domain. Only one zero response is permitted at each edge.
Here you have a part of the SRF for NOAA-16 AVHRR/3 channel 4 in file `n16avhr4.srf':
micro-m Rel. response(%), c1=1.191044E-05 mW m-2 cm4 sr-1, c2=1.438769 K cm 8.78 0 8.8 0.04117 8.82 0.01924 ... 11.22 99.04 11.24 99.49 11.26 100 11.28 98.23 11.3 96.21 ... 12.78 0.09976 12.8 0.08722 12.82 0
srf2radi
The syntax for running the srf2radi
program is:
srf2radi temp_0 [temp_n num_gaps] { [--verbose] | [--Verbose] } [<srf_file] [>radi_file]
First argument, temp_0, should be the first temperature of the LUT. If no other arguments are given, LUT will consist of only one record. If more arguments are given these should be the last temperature of LUT, temp_n, and the number of temperature gaps for the LUT, num_gaps. Temperatures must be given in kelvin (please, never use degree kelvin or similar).
num_gaps must be an integer larger than zero if different temperatures are given, but it can be zero if first and last LUT temperatures are equal. temp_0 and temp_n are floating point numbers, and first should be less than last. Only both temperatures can be equal if number of gaps is zero.
If an extra argument is given, it must be `--verbose' or `--Verbose'. For the first case, the program computes effective wavenumber by means of a numeric algorithm, which has been used to produce data files for a study on existence of effective wavenumbers for NOAA-16 AVHRR/3 channel 4 and fixed temperatures. A paper on this study was written and has been submitted to the "International Journal of Remote Sensing" for publication. For the second case, the program also computes effective wavenumber by means of an analytic algoritm already published in the same journal. More info and examples on effective wavenumbers can be found in section Format of Output LUT.
SRF is input via console or a file.
If a SRF file is chosen, then
standard input must be
redirected to the file. This is
accomplished with special shell commands, such as
`<srf_file' for
bash
, or COMMAND.COM
. You can see some examples at
section Some Examples. Please note that if you do not redirect
standard input to a file the program will wait for your input, such as the
cat
program does.
Standard output can be
redirected to a file to save it for the future.
This is also accomplished with special shell commands, such as
`>radi_file' for bash
, or COMMAND.COM
. If you add
`>myfile' at the end of command line, standard output will be placed in
the file `myfile'. Use more proper names for your files.
You can also use pipelines to get standard output of other programs (such as
cat
) as the standard input of srf2radi
, and standard output of
srf2radi
as the standard input of other programs (such as a2ps
).
Use of pipes is a feature of your shell. In many shells, such as bash
,
pipelines is a sequence of simple commands separated by `|'. For
example, with `cat n16avhr4.srf | srf2radi 200 300 150 | a2ps
-3 -o test.ps' you obtain a 3-column PostScript file (`test.ps') with a
LUT from 200 to 350 K in steps of 1 K for NOAA-16 AVHRR/3 channel 4.
At the beginnig of file `srf2radi.c' there is a brief summary for the format of output LUT. Nevertheless, it can seem a bit cryptic for those who have never worked with these LUTs. In this chapter the format is explained with just an example. In this example you can find all possible types of data in the LUT. For simpler LUTs, simply apply the first types explained.
This is the output of the command `srf2radi 273.15 --Verbose <n16avhr4.srf':
273.1500000000000 73.78698503485649 1.3145673911 89101 1 917.9452407357154 4.868067754459915e-1 7 2 783.9278435283366 -0.05433485850002671 916.8399314153244 -0.0004628511022501491
It means that for a temperature of 273.15 K, band integrated radiance for NOAA-16 AVHRR/3 channel 4 is equal to 73.78698503485649 mW @elevate{m,-2}@elevate{sr,-1}cm, and derivative of band integrated radiance with temperature is 1.314567391189101 mW @elevate{m,-2}@elevate{sr,-1}@elevate{K,-1}cm.
With `--Verbose' two algorithms are used to find effective wavenumbers. Effective wavenumber is a wavenumber for which Planck's function gives a monochrome radiance equal to the band integrated radiance. Algorithms are based on a numeric general equation solver (numeric algorithm), and an analytic cubic equation solver (analytic algorithm).
Output also means that the numeric algorithm has obtained one effective wavenumber, which is 917.9452407357154 @elevate{cm,-1}, for which band integrated radiance can be computed with a temperature relative error of @scien{4.9,-17}only.
The analytic algorithm finds 2 effective wavenumbers. First at 783.9278435283366 @elevate{cm,-1}but it seems to be a fake effective wavenumber because its temperature relative error is -5.4 %. Second wavenumber is found at 916.8399314153244 @elevate{cm,-1}with a temperature relative error of -0.0046 %.
Radiances and derivatives of radiance with temperature can be used to compute radiances for other temperatures not included in the LUT, and the wavenumbers can be used to determine whether the best fitting parameters for some model functions have a physical meaning. For more details, read the paper in International Journal of Remote Sensing.
If you find a bug in srf2radi
, please send electronic mail to
Conrado.Badenas@uv.es. Include the
version number, which can be
found by running `srf2radi'. Also include in your message the output
that the program produced and the output you expected.
If you have other questions, comments or suggestions about
srf2radi
, contact the author via electronic mail too.
He might try to help you out after all.
Jump to: - - a - b - c - d - e - f - g - h - i - l - m - n - o - p - r - s - t - v - w - z
load_srf
This document was generated on 19 February 2001 using texi2html 1.56k.