Access to IPP smf files
Go back up.
getsmf
IPP smf files contain the results of camera stage processing.
They are FITS format files containg tables with the photometric and
astronometric measurements for the
sources detected in a single exposure.
getsmf.php is a tool that may be used to retrieve an IPP smf file
given certain parameters.
The url of the tool is
http://misc.ipp.ifa.hawaii.edu/getsmf.php
When this page is accessed without parameters it simply displays an
error message.
With valid parameters the tool returns the contents of the selected
smf file.
Note: Obviously displaying the contents of a FITS file in a web browser is
not very useful.
getsmf.php is intended to be accessed directly using HTTP.
It is easy to write scripts that use the command line tools curl or wget
to retrieve smf files using this tool.
For example, the following two equivalent unix commands copy the contents of
the smf containing the results from the cameraRun with cam_id=1780283)
to a local files:
curl 'http://misc.ipp.ifa.hawaii.edu/getsmf.php?cam_id=1780283' -o 1780283.smf
wget 'http://misc.ipp.ifa.hawaii.edu/getsmf.php?cam_id=1780283' -O 1780283-wget.smf
The previous method allows the user to control the name of the local copy.
If one would like to use the original file name supplied by the server
the commands may be changed to:
curl 'http://misc.ipp.ifa.hawaii.edu/getsmf.php?cam_id=1780283' -O --remote-header-name
wget 'http://misc.ipp.ifa.hawaii.edu/getsmf.php?cam_id=1780283' --content-disposition
In this example the name of the downloaded file is "o7616g0008o.1131492.cm.1780283.smf".
Note: The quote characters in these commands are needed to prevent
the '?' characters from being interpreted by user's shell.
parameters
There are a few parameters that may be used to select specific smf files.
Parameters are supplied by appending them to the base url following
a '?' character.
If multiple parameters are needed
they should be separated by a '&' character.
cam_id=value
The examples above demonstrated selection by cam_id. When a
cam_id is supplied any other parameters supplied are ignored.
exp_name=value
Selects an smf file for an exposure with the given name.
For example supplying the parameter: exp_name=o7616g0008o
gets the same result as the examples listed above. (As of the time
of this writing).
Note that exposures may be processed multiple times. If no other selection
parameters are found, the smf for the most recent processing is selected.
release=value
When used with exp_name, the release parameter specifies the
ipp release (processing version) for the smf file.
For example: exp_name=o5275g0401o&release=3PI.PV3
retrieves the
smf processed for exposure o5275g0401o in 3PI.PV3.
If the release were changed to 3PI.nightly
the smf from the original nightly procecessing would be retrieved.
(At the time of this writing, if the release parameter were omitted
the 3PI.PV3 version would also be retrieved since it is currently
the latest processing.)
data_group=value
This is a rarely used parameter.
With exp_name, chooses smfs from camRuns processed as part of
the supplied data group.
Errors and Exceptions
If an smf matching the supplied parameters is not found in the IPP, a message
is included in the response. The http request succeeds.
After a user retrieves a file in this manner it should be checked
to insure that it
is actually a FITS format file.
For example the following getsmf request asks for a non-existent smf:
curl 'http://misc.ipp.ifa.hawaii.edu/getsmf.php?cam_id=99999999999' -o test.smf
After this command succeeds, the file test.smf is not a FITS file.
Instead it contains text. This fact and its contents may be found
with the following
commands.
$ file test.smf
test.smf: ASCII text
$ cat test.smf
Could not find smf for cam_id: 99999999999.