BUGS · SEE_ALSO
qpsort -- sort a qpoe file through filters
qpsort input_qpoe region qpoe eventdef sorttype
qpsort sorts a qpoe file by any event attribute to another qpoe file. Any type of filtering can be applied to the input qpoe file, including region filtering. In addition, the size of the output event record can be different from the size of the input event record. (Of course, usually one makes the output record equal to or smaller than the input. If the output record size is made greater than the input record, a warning is issued and the "extra" part of the record is undefined.) It requires disk space TWICE the size of the input QPOE file to successfully sort. Also, if the input file is LONGER than ~20-25Mbytes, it will be necessary to adjust the sortsize parameter (nominally 1Mbyte). This is necessary because the Operating System won't support more than ~25 simultaneous files. So the rule of thumb would be to make sortsize equal to 1/20 of the size of the input QPOE file. Of course, your system must have sufficient memory to allocate a buffer of size sortsize. So, adjusting sortsize and finding sufficient disk space should are necessary to tune this task for large files. However, for a file >25 Mbytes we also recommend doubling pagesize and bucklen, and >50 Mbytes they should be quadrupled. This error never appears until the very end of the task.
- input_qpoe = "" prompt = input qpoe file name
The input qpoe file name. The extension ".qp" will be added to the file if there is no extension. Qpoe filters can be applied using the bracket notation to filter the input photons.
- region = "" prompt = region descriptor
The region descriptor. If null is input, the entire field is copied (subject to the qpoe filters specified with the input file name). Otherwise only those photons are copied which pass the spatial region filter.
- qpoe = "" prompt = output qpoe file name
The name of the output qpoe file. The extension ".qp" will be added to the file if there is no extension. The output file can be the same as the input file.
- eventdef = "" prompt = event definition
The event definition of the output QPOE file. If the user enters the empty string, "", the event definition will be copied from the input QPOE file. See help qpoe for information on modifying the event definition.
- sorttype = "position" prompt = type of sort
The type of sort to perform. This string consists of a list of event element names that specifies the order in which to sort the event record. For example, "y x time" will sort on the "y" element as the primary key, the "x" element as the secondary key, and "time" as the tertiary key. Using "position" (the default) will sort with "y" as the primary key and "x" as the secondary key.
- (exposure = "NONE") [string]
The PLIO mask containing exposure information for the specified source image. If the null string is input, the name will be the same root as the source image file with a "_exp.pl" extension. If "NONE" is input, no exposure filtering is performed.
- (expthresh = 0.) [real]
The percentage of total exposure required for a given source pixel to pass the exposure filter, (if an exposure mask is present). For example, if expthresh is 50.0, then only pixels whose exposure time is >= 50% will be used. An exposure threshold of 0% allows all photons to pass the exposure filter.
- (clobber = no) [boolean]
Boolean flag specifying whether or not the qpoe file can be overwritten, if it already exists.
- (display = 1) [int]
The display level. A display level of 0 generates no display. A display level of 1 generates a display of header information.
- (sortsize = 1000000) [int]
The number of bytes that are to be sorted at a time. This allows users to tailor the task to the amount of available memory. If there is a lot of memory available, sortsize should be set large enough so that the task will do an in-core sort. If only a small amount of memory is available, use a smaller number. In this case, several core loads will be sorted and written to temp files, which are then merged.
- (qp_internals = yes) [boolean]
Boolean flag controlling whether the internal qpoe parameters (see below) are prompted for, or whether they are defaulted to internally hardwired values. This parameter is not usually changed by the user. (Prompting is normally turned off during stand-alone debugging only.)
- (qp_pagesize = 2048) [int]
Page size for the qpoe file. This parameter is internal to qpoe and should not normally be changed.
- (qp_bucketlen = 4096) [int]
Bucket length for the qpoe file. This parameter is internal to qpoe and should not normally be changed.
- (qp_blockfact = 1) [int]
The default block factor for IMIO. This parameter is internal to qpoe and should not normally be changed.
- (qp_mkindex = no) [boolean]
Boolean flag that an index should be made for the qpoe file. This parameter is internal to qpoe and should not normally be changed.
- (qp_key = "") [string]
Key on which to make the qpoe index. This parameter is internal to qpoe and should not normally be changed.
- (qp_debug = 0) [int]
Debug level for qpoe internals. This parameter is internal to qpoe and should not normally be changed.
1. Spatially sort a qpoe file, accepting only photons whose pi value is in the range 0:7, and whose position is within one of 5 annuli. Make the resulting qpoe file of size "region", i.e., include the region number of each event in the file.
cl> qpsort "i296[pi=0:7]" "ann 512 512 0 100 n=5" "foo" "region" "position" i296.qp[pi=0:7] (ann 512 512 0 100 n=5; no exp.) -> foo.qp Creating QPOE output file: foo.qp
For files with length greater than sortsize, QPSORT must create temporary scratch files. These are always created in the CURRENT WORKING DIRECTORY regardless of the location of the input and output files.
Documentation on region filtering (help regions ) for a description of the spatial filter user interface.
Documentation on file extensions (help extensions ) for a description of PROS file extensions.
Documentation on coordinates (help coords ) for a description of PROS coordinate conventions.