Applying Genie's result to a Test Scene

The spatial-spectral image processing evolved by Genie can now be applied to a different scene. The easiest way to do this is to select Training from Aladdin's menu bar, push the Genie button, and select Exploit. (Alternatively, if the Magic Carpet dialog box is still open, select the 'Exploitation' tab.)

If you used RSI's "IDL" proprietary image processing software in your training run, please check that the 'Basic' option Use Libgenie is set to - (the default).

If you used our open source C-code image processing library for your training run, please set the 'Basic' option Use Libgenie to +.

Give the name of the Genie run whose solution you wish to apply to a new scene, and pick the file to be processed. You can select any file readable by Genie, including training files. If you select a training file, Genie will apply its solution to the raw image connected with that training data.

Another way to apply Genie to another scene is to use an ISIS IDL command, chr2pro, which produces an executable that can be called from IDL:

chr2pro runName [options...]

This creates a new program file called runName.pro which can called from an IDL or ENVI session to apply the algorithm to a new scene:

chr2pro is a Perl script that uses data generated during a Genie run to produce an IDL .pro file that embodies a selected chromosome (complete with fitted coefficients, threshold etc) in such a way that that chromosome can be easily applied to new images and fitness scores obtained.

To use it, make sure you're in the directory that you ran Genie in, and type:

chr2pro runName[chrfile.chr]
      

The Perl script will look in the current directory for the chrfile.chr file containing information about the chromosome (if that file is not specified, then it will be assumed to be runName.chr, which is generated automatically at the end of the Genie run). Note that you can alter the .chr file by hand (if you want to try different chromosomes), or generate new .chr files using sdb2chr. The chr2pro script will also use information from the runName.opt file generated during the run.

While running, chr2pro will tell you the name of the .pro file it is generating and some other useful information.

To use the .pro file from within IDL, first make sure that your IDL_PATH includes the genie lib/pro directory. If you have checked out a new version of the genie/Startup file, this will do it automatically.

Then start idl.

The calling syntax for the .pro file is explained in comments at the top of the .pro file. If the .pro file was generated from a Genie run with run name `foo' and the chromosome has ID = 000042, then the .pro file will be called `foo_000042.pro'. Run it like this:

x = foo_000042('my_fits_file.fits')
      

and x will now contain the result of applying the chromosome (plus associated backends) to the FITS file.

Display it using:

tvscl, x
      

If you have a marked up GTF file then you can use that instead:

x = foo_000042('my_gtf_file.gtf')

This will retrieve the appropriate FITS background file, and will use whatever fitness metric was used in the GENIE run to calculate a score. The score is printed out, unless the /quiet option is specified. A structure containing the score information can also be returned using the `scores' keyword:

x = foo_000042('my_gtf_file.gtf', /quiet, scores=s)
      

After running, s will contain a structure that lists the fitness score, and (if the HAMMING distance metric was used), the false alarm rate and the detection rate.

You can also get the .pro file to write out the result as a GRF file which can be viewed under Aladdin (this allows you to see the results as an overlay and makes for pretty screenshots!). To do this, specify the grfFile option:

x = foo_000042('my_gtf_or_fits_file', grfFile='out.grf')
      

The file out.grf can then be viewed under Aladdin, by selecting File, and then Load Results.