not logged in login | register
Docs:
Using this website and web service, you can search and manage profiles of filters used for astronomical purposes. Version 1.0 allows you to post your own profiles (after registration) and search the profiles in the database by several criteria.
The filter profile webservices use the SOAP standard to communicate with the clients. Some of the functions can be called via HTTP POST and HTTP GET as well. We provide several versions of each function to access our database in your favourite format. We support standard SOAP format, VOTable and ASCII.
To learn more about WebServices, visit the following sites: http://msdn.microsoft.com/webservices/ or http://java.sun.com/webservices/ Web service clients and VOTable parsers are also available in Perl, Python etc.
Search service:
search.asmx
WSDL:
search.asmx?WSDL
Admin service:
admin.asmx
admin.asmx?WSDL
Utility service:
util.asmx
util.asmx?WSDL
Since every registered user of our system can post his/her filter profiles to the database, it is important to identify them not only with login name and password while using the web site, but somehow when accessing the administrative function via webservices. WebServiceId (named UserGUID in the functions) is a unique 64bit integer, which is used for this identification purpose. You can get your WebServiceId instantly after registration.
You can post new filter only with your WebServiceId, and you can modify or delete only those filter which were posted by you.
Each filter profile consists of a header and an array of wavelength-response pairs.
1.2.1. Filter SOAP object
Implements the filter profile's header
Member name
Data type
Description
Id
int (4)
Database primary key of the filter. Set to 0, when you want to create a new filter, anyway set to the appropriate Id
Name
string
Name of the filter
Long description of the filter
Ucd
Universal Content Descriptor
Version
Version number of the filter
DateCreated
datetime
Date of registration into the database, read-only
DateModified
Date of the last modification, read-only
WavelengthMin
double (8)
Minimum of the wavelength interval, read-only, calculated by the service
WavelengthMax
Maximum of the wavelength interval, read-only, calculated by the service
WavelengthEff
Effective wavelength (weighted average), read-only, calculated by the service
WavelengthScale
enum
Wavelenght scale0: Linear1: Logarithmic2: Other
EffectiveWidth
Effective width of the filter in Angtroms
Unit
Unit of response values
Responses
array
An array of Response object to store wavelength-response pairs
1.2.2. Response SOAP object
FilterId
The ID of the filter which this Response object belongs to.
Wavelength
The wavelength in Angstroms
Value
The response value associated with the wavelength
Note! Filter response values may be uncalibrated, or normalized to 1 or 100%.
1.2.3. FilterGraphParameters object
This object is used with the plot function. Initialize all values before calling the function. Set numeric values to -1 to use default.
width
Width of the image in pixels
height
Height of the image in pixels
wavelengthMin
float (4)
Minimum value on the x-axis
wavelengthMax
Maximum value on the x-axis
valueMin
Minimum value on the y-axis
valueMax
Maximum value on the y-axis
wavelengthLogBase
Log base on the x-axis
valueLogBase
Log base on the y-axis
titles
bool
Displays title on the graph if true
normalize
Normalizes filter to 1 at peak if true
autoLoad
If true, the service loads filters automatically when a valid FilterID is set.
Filter Profile Admin Service functions are for registered users and the functions can be accessed only with a WebServiceId recieved at registration.
Functions
Function name
Parameters
CreateFilter
Records a new filter header to the database
string UserGUID
Your WebServiceId
string name
string description
string ucd
string version
enum wavelengthScale
Linear = 0 or Logarithmic = 1 or Other = 2
return value int
Returns the database ID of the new filter
CreateFilterIndirect
Records a new filter header to the database, but accepts a standard SOAP Filter object as an input parameter. Can be used from SOAP client only. Also records the FilterResponse objects in one step.
object filter
Filter to record to the database
ModifyFilter
Modifies an existing filter header
int filterId
ID of the filter to modify
return value bool
Returns true when the filter modified successfully, otherwise false
ModifyFilterIndirect
Modifies an existing filter header record. Note! Since a SOAP filter object can contain filter responses, and those can be sent to this method too, you should know that this function does not modify the wavelength-response pairs, only the header info. To modify responses, delete them first using the DeleteFilterResponses method, and insert the new responses with AppenFilterResponseIndirect.
The filter to modify with the new data in a SOAP object. The object's FilterId must be specified.
DeleteFilter
Deletes a filter from the database by it's ID
int id
ID of the filter to delete
Returns true when the filter deleted successfully, otherwise false
DeleteFilterIndirect
Deletes a filter from the database by it's ID. Accepts Filter SOAP object as input.
The filter to delete in the form of a SOAP object. The object's FilterId must be specified.
AppendFilterResponse
Appends a wavelength-response pair to a filter specified by its Id
Id of the filter to attach the new wavelength-response pair
double wavelength
Wavelength in Angstroms
double response
Response value
Returns true when the new wavelength-response pair appended successfully, otherwise false
AppendFilterResponseIndirect
Appends an array of wavelength-response pairs to a filter specified by its Id
array responses
An array of wavelength-response pairs in the form of a SOAP array.
Returns true when the new wavelength-response pairs appended successfully, otherwise false
DeleteFilterResponses
Deletes all wavelength-response pairs associated with the filter
Id of the filter which wavelength-response pairs should be deleted
Returns true when the responses deleted succesfully, otherwise false
The Filter Profiles Search service functions provide functionality to query the filter database. They can return data in different standard formats: SOAP XML, plain ascii and the NVO standard VOTable.
GetFilterGetFilterAsciiGetFilterVOTable
Returns a Filter profile in different formats. The function can return the header only, or the response values too.
Id of the filter to return
bool returnResponses
If true, function returns response values too
return value object
The filter in a SOAP XML object, VOTable or an ascii string
GetAllFilters
Returns an array of all filters in the database
return value array
The array of filters
GetAllFiltersVOTable
Returns all filter headers from the database in a VOTable
return value VOTable
VOTable containing the filter headers
FindFiltersByKeyword
Performs a LIKE query on the filters table and returns results as an array of filters. The search is performed on the following columns of the Filters table: Name, Description, UCD, Version
The array of filters matching the criterium
FindFiltersByKeywordVOTable
Acts like the previous function except that it returns VOTable and cannot return response values
The VOTable containing the filter headers matching the criterium
FindFiltersAdvanced
Returns filters matching the advanced criteria. The different search conditions are connected with AND. Specify zero string ("") to omit conditions with string data type, and -1 for numeric data types.
string keyword
LIKE query in the following columns of the Filters table: Name, Description, UCD, Version.
LIKE query on the Name column.
LIKE query on the Description column.
LIKE query on the UCD column.
LIKE query on the Version column.
string dateCreatedFrom
If specified, the column must be greater than this value.
string dateCreatedTo
If specified, the column must be less than this value.
string dateModifiedFrom
string dateModifiedTo
double wavelengthMinFrom
double wavelengthMinTo
double wavelengthMaxFrom
double wavelengthMaxTo
double wavelengthEffFrom
double wavelengthEffTo
double effectiveWidthFrom
double effectiveWidthTo
Linear = 0 or Logarithmic = 1 or Other = 2 or Any = -1Specify Any to omit this criterium
Array of filters matching the criteria
FindFiltersAdvancedVOTable
Function and parameters are the same as the previous, except that this function returns results in a VOTable format and does not return response values
The VOTable containing the filter headers matching the criteria
FindFiltersAdvancedIndirect
Function works exacly as FindFiltersAdvanced, except it uses a structure as an input instead of the numerous parameters
struct par
Structure of parameters as described above
FindFiltersBySqlQuery
Function returns filter profiles matching the specified SQL query. To get more information on valid queries, see the database structure section of this documentation.
string sql
A SQL SELECT, WHERE and ORDER BY clause to run on the Filters table.
FindFiltersBySqlQueryVOTable
The same function as the previous, except that this one returns filter headers in a VOTable. Does not return response values.
The Filter Profile Utility webservice functions provide functionality to perform basic operations on filter profiles. Most of these functions can be called from a SOAP client only and does not support the VOTable data format.
ResampleFilter
Resamples the filter to a different wavelength interval and scale. The function uses linear interpolation at the unknown wavelength values and assumes 0 outside the measured interval. This operation is required before convolving with spectra.
The formula to determine new wavelength values:
Linear resampling: wavelength = start + i * incLogarithmic resampling: 10^(start + i * inc)
where i goes from 0 to points - 1
The filter object with filled Responses array
enum scale
Linear = 0 or Logarithmic = 1, determines the new scale of the wavelength axis
double start
The new minimum wavelength in the resampled filter.
double inc
Incrementum of the resampled filter, used in the formula above
int points
Number of points to resample to
Returns the resampled filter
NormalizeFilter
Normalizes filter response curve.
Returns the normalized filter
PlotFilterGraph
Generates a graph with the filter profile curves on it. The parameters should be passed in a FilterGraphParameters object. It is not nessesary to be the filters in the database, you can plot your own curves too. However, if you want to plot filters that are already in the database, it's enough to post a filter header with the FilterID field specified and the Points array empty, the service will recognize them and load from the database automatically.
array filters
An array of filter objects to plot.
A FilterGraphParameters structure with the parameters of the graph.
return valuebytes
A binary array containing the graph in GIF format. Save it to a file or send to the user interface from your service client application.
Since you can query the filter database using SQL query, you should get familiar with the database structure. Our database server uses the T-SQL 92 standard query language, so joins and aggregate function can be used. Text fields are stored in two-byte unicode.
Note! If you use the WebService to return data in a VOTable format, you are allowed to use SELECT [column[, column ...]] format to specify the columns to return. When using the web form or the webservice, but you want the results in a SOAP object format, you always have to use SELECT * (star) instead of a column list, otherwise you will get an error.
We implemented a SQL preparser to allow using predefined constants in queries. These constants are detailed at the description of each column in parentheses. All these constants are upper case!
This table contains filter header information
Column name
ID
Primary key of the Filters table
nvarchar (255)
ntext
UCD
nvarchar (15)
Version of the filter
datetime (8)
Date of registration into the database
Date of last modification
float (8)
Minimum of the wavelength interval
Maximum of the wavelength interval
Effective wavelength (weighted average)
Wavelenght scale 0: Linear (LINEAR) 1: Logarithmic (LOGARITHMIC) 2: Other (OTHER)
Effective width of the filter in Angstroms
Indices on the Filters table
Index name
Columns
PK_Filters
Primary key, Unique
This table contains filter responses. The FilterID column determines the corresponding row in the Filters table and should be use for join queries..
FilterID
Foreign key to the Filters table
Response value. (Some filters are stored normalized, some in absolute values or percent, flux calculation eliminates this factor.)
Indices on the FilterResponses table
FK_FilterResponses_Filters
FilterID -> ID
Foreign key
GetFilterResponsePeak_Value(@FilterID int)
Returns the peak throughtput value of the filter
GetFilterResponsePeak_Wavelength(@FilterID int)
Returns the maximum throughtput wavelength of the specified filter
GetFilterResponseValue_Interpolate (@FilterID int, @Wavelength float)
Returns the filter response value at any wavelength using linear interpolation
GetFilterWavelengthEff (@FilterID int)
Returns the filter's effective wavelength. Function performs a weighted average calculation on FilterResponses belonging to the filter instead of returning the value stored in the Filters table.
The following samples illustrate how to use the SQL query interface. You can execute each query by clicking on the execute link.
T-SQL command
SELECT * FROM Filters WHERE WavelengthEff BETWEEN 3000 AND 5000
Returns all filters in the optical interval
execute
SELECT * FROM Filters WHERE GetFilterResponseValue_Interpolate(ID, 3647.35) > 0.5
Returns the filters where the response at 3647.35 Angstroms is more than 0.5
SELECT * FROM Filters ORDER BY Name
Returns filter headers in alpahbetical order by their Name column