Search Keyword Values


The Search Keyword Values command processes a collection of image files to find images with header keywords matching specific criteria. For example, this command can be used to create a list of image having exposure time within a range of values, acquired after a specified time, and using a particular filter. You can select whether any or all keywords mast pass the comparison tests. Those images passing the test are listed in a Report Window from which they may be graphed, saved to a file or File List, or used in a script (see Report Windows). Images and image sets may also be displayed directly from the Report Window.

The related Create Image Keyword List command is also is useful for determining which keywords exist in the source images before using the present command to refine the search based on keyword values.

Search Keyword Values Properties

Profile [|>]

Selects the parameter profile for this command and allows you to save or work with existing presets.

Select

Opens the Select Source Images dialog to choose images from an image window, folder, files, name template, or a Mira File List.

generate/checkbox7.jpg Require matching all keywords

This property determines whether images are collected that satisfy any of the keyword comparisons or all of the keyword comparisons. If unchecked, any image matching one or more comparisons will be listed. If checked, only images matching all comparisons are listed.

[Clear All]

Resets the keywords and other properties in the keyword grid.

Overview of the Keyword Search Strategy

For each source image, each Keyword test requires selecting the keyword Type (the type of data held by the keyword value), the Comparison to be made between the image and target value, and at least one Value used in the comparison. Most comparisons involve a single Value but two Comparison methods involve a second value named Value2. The specific comparison between the Value(s) and the image keyword value is determined by the Type, hence a Number type can possibly be compared as a String or Logical type. The Type and Comparison options are described below. Keywords to be tested may have any name, subject to the 8 character maximum of FITS format. In addition, the keyword may not be the "blank" keyword.

Keyword Type Options

String

A string comparison is made between the keyword value and the image keyword value. This is the natural choice for inherently string value keywords, such as OBJECT or FILTER. The values are compared independent of case.

Number

A numeric comparison is made between the keyword value and the image keyword value. This is the natural choice for inherently number value keywords, such as EXPTIME, GAIN, AIRMASS, or JD.

Integer

An integer comparison is made between the keyword value and the image keyword value. This is the natural choice for inherently integer-valued keywords, such as NAXIS1.

DateTime

A date and time comparison is made between the keyword value and the image keyword value. This is the natural choice for merged date+time keywords, such as DATE-FITS or DATE-OBS. The merged date +time Value(s) must be specified with a 'T' separator character per the ISO 8601 standard, as yy:mm:ddThh:mm:ss.sss. The number of decimal places is unimportant. The window may be resize and the column separators dragged to provide greater width if needed to enter the Date-Time string.

Date

A date comparison is made between the keyword value and the image keyword value. This is the natural choice for keywords that contain only a date without time. The Value(s) must be specified in the format yy:mm:dd.

Time

A time comparison is made between the keyword value and the image keyword value. This is the natural choice for keywords that contain only a time value, as in the pre Y2K format for TIME-OBS. The Value(s) must be specified in the format hh:mm:ss.sss. The number of decimal places is unimportant.

Logical

An character comparison is made between the keyword value and the image keyword value. This is the natural choice for inherently Boolean (true or false) value keywords, such as SIMPLE.

Keyword Comparison Options

None

No comparison is to be made with the specified keyword

==

The image keyword value is tested for equality with the Value.

<

The image keyword value is tested as less than the Value.

>

The image keyword value is tested as greater than the Value.

< or >

The image keyword value is tested as less than Value or greater than Value2. This excludes a range of values.

>= and <=

The image keyword value is tested as greater than or equal to Value and less than or equal to Value2. This includes a range of values.

not =

The image keyword value is tested as not equal to Value.

<=

The image keyword value is tested as less than or equal to Value.

>=

The image keyword value is tested as greater than or equal to Value.

Keyword Search Results in the Report Window

The columns in the Report Window vary according to the number of keywords specified.

Keyword Report Window Properties

Image #

Sequential number in the Report Window.

generate/checkbox7.jpg

Check this box to select images for display or saving to a File List. To select all images, check the box in the top header row. To display a single image, double click on it (with or without its box checked).

Image Name

The image name, not including the file path.

<Keywords>

The selected keywords are each listed in middle columns of the Report Window.

File Path

The path of the image file.

Notes

The last grid column may be edited to add Notes to the Report Window. These notes are saved with the other grid data using the Save As... command in the context menu.

 

After pressing the [Process] button, Mira scans the image collection to test all the keyword values in each image header. If any or all keywords satisfy the comparison criteria, then the image is added to a new Report Window as shown below. If a keyword value does not satisfy the comparison, the value is not listed.

The generate/checkbox7.jpg Require matching all keywords option determines whether images having any keyword match or all keyword matches are added to the table. Uncheck this option to include all images with at least one keyword comparison match. Check it to include only images matching all keyword comparisons.

Example

The pictures below show the result of using the profile settings in the dialog at the top of the page to find EXPTIME and NAXIS1 keywords from images in a folder. The first Report Window shows the result with Require matching all keywords unchecked. In this case, any keyword that satisfies its comparison allows the image to be listed in the Report Window. Then checkboxes in the Report Window may be used to select images for further use, for example, displaying or saving to a File List.

The next Report Window shows the same keyword settings as above, except with Require matching all keywords checked. In this case, both keywords must pass their comparison tests in order for the image to be listed in the window. Note that images 6 through 11 in the table above meet all criteria and are thus listed in the following Report Window:

Working with Images in the Report Window

After images are listed in the results window, a substantial collection of graphing and other tools are available for analysis. Some of these tools are available as commands in the pull-down menus for the Report Window, while others are accessed by right clicking on the grid to open its Grid Context Menu like that shown below. In addition, you can work with data in the Report Window from scripts using the CGridView script class.

In the menu above, the Display selected images as an image set command displays all checked images in the Report Window as an Image Set. If only one image is checked, this command is disabled and single image display is enabled.

The Save as File List command saves all checked images as a File List for future use. The File List is also added to the Recent Files submenu for easy access. Other commands, such as Create Chart from Grid are described for the Create Image Keyword List command.

Another Example

Below is a real-world example of finding images in a folder of mixed camera data meeting several criteria. To find only those images meeting many useful observational criteria, check generate/checkbox7.jpg Require matching all keywords. Using the 5 keywords listed below, the results table shows that requiring all matches would return zero images because no image has a FILTER keyword matching 'R'. Compare these results with those above for images named "Hyak0324." The DateTime keyword test rejects two Hyak0324 images with a DateTime value that has time before 01:00:11.

Related Topics

Image Information

FITS Header Editor

Opening and Saving Files

Grid Controls

Plotting Images and Data

Create Image Keyword List


Mira Pro x64 User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.