astropy:docs

- Index
- Modules

### Navigation

- imexam v0.5 »

# Connect

class `imexam.connect.``Connect`(target=None, path=None, viewer='ds9', wait_time=10, quit_window=True)

  Bases: `object`

  Connect to a display device to look at and examine images that are displayed within

  The control features below are a basic set that should be available in all display tools. The class for the display tool should override them and add it’s own extra features.

  Parameters:

  target: string, optional

  > the viewer target name or id (default is to start a new instance of a DS9 window)

  path : string, optional

  > absolute path to the viewers executable

  viewer: string, optional

  > The name of the image viewer you want to use, currently only DS9 is supported

  wait_time: int, optional

  > The time to wait for a connection to be eastablished before quitting

  Attributes

  window: a pointer to an object | controls the viewers functions
  imexam: a pointer to an object | controls the imexamine functions and options

  Methods Summary

  `aimexam`() | show current parameters for aperture photometry
  `alignwcs`(**kwargs) | align frames with wcs
  `blink`(**kwargs) |
  `cimexam`() | show current parameters for column plots
  `clear_contour`() |
  `close`() | close the window and end connection
  `cmap`(**kwargs) | Set the color map table to something else, in a defined list of options
  `colorbar`(**kwargs) | turn the colorbar on the screen on and off
  `contour`(**kwargs) | show contours on the window
  `contour_load`(*args) | load contours from a file
  `crosshair`(**kwargs) | Control the current position of the crosshair in the current frame, crosshair mode is turned on
  `cursor`(**kwargs) | move the cursor in the current frame to the specified image pixel, it will also move selected regions
  `disp_header`(**kwargs) | Display the header of the current image to a window
  `eimexam`() | show current parameters for contour plots
  `frame`(*args, **kwargs) | move to a frame
  `get_data`() | return a numpy array of the data in the current window
  `get_data_filename`() | return the filename for the data in the current window
  `get_frame_info`() | return more explicit information about the data displayed in the current frame
  `get_header`() | return the current fits header as a string, or None if there’s a problem
  `get_viewer_info`() | Return a dictionary which has information about all frames loaded with data
  `grid`(*args, **kwargs) | convenience to turn the grid on and off, grid can be flushed with many more options
  `hideme`() | lower the display window
  `himexam`() | show current parameters for histogram plots
  `imexam`() | run imexamine with user interaction. At a minimum it requires a copy of the data array
  `jimexam`() | show current parameters for 1D fit line plots
  `kimexam`() | show current parameters for 1D fit column plots
  `limexam`() | show current parameters for line plots
  `load_fits`(*args, **kwargs) | convenience function to load fits image to current frame
  `load_mef_as_cube`(*args, **kwargs) | Load a Mult-Extension-Fits image one frame as a cube
  `load_mef_as_multi`(*args, **kwargs) | Load a Mult-Extension-Fits image into multiple frames
  `load_region`(*args, **kwargs) | Load regions from a file which uses ds9 standard formatting
  `load_rgb`(*args, **kwargs) | load three images into a frame, each one for a different color
  `make_region`(*args, **kwargs) | make an input reg file with [x,y,comment] to a DS9 reg file, the input file should contains lines with x,y,comment
  `mark_region_from_array`(*args, **kwargs) | mark regions on the viewer with a list of tuples as input
  `match`(**kwargs) | match all other frames to the current frame
  `mimexam`() | show the current parameters for statistical regions
  `nancolor`(**kwargs) | set the not-a-number color, default is red
  `panto_image`(*args, **kwargs) | convenience function to change to x,y images coordinates using ra,dec
  `panto_wcs`(*args, **kwargs) | pan to wcs coordinates in image
  `plotname`([filename]) | change or show the default save plotname for imexamine
  `readcursor`() | returns image coordinate postion and key pressed, in the form of x,y,str with 0arrar offset
  `rimexam`() | show current parameters for curve of growth plots
  `rotate`(*args, **kwargs) | rotate the current frame (in degrees)
  `save_header`(*args, **kwargs) | save the header of the current image to a file
  `save_regions`(*args, **kwargs) | save the regions on the current window to a file
  `save_rgb`(*args, **kwargs) | save an rgb image frame that is displayed as an MEF fits file
  `scale`(*args, **kwargs) | Scale the image on display.The default zscale is the most widely used option
  `set_region`(*args, **kwargs) | display a region using the specifications in region_string
  `setlog`([filename, on, level]) | turn on and off imexam logging to the a file
  `show_window_commands`() | print the available commands for the selected display application
  `showme`() | raise the display window
  `showpix`(*args, **kwargs) | display the pixel value table, close window when done
  `snapsave`(*args, **kwargs) | create a snap shot of the current window and save in specified format. If no format is specified the filename extension is used
  `unlearn`() | unlearn all the imexam parameters and reset to default
  `valid_data_in_viewer`() | return True if a valid file or array is loaded in the current viewing frame
  `view`(*args, **kwargs) | Display numpy image array
  `wimexam`() | show current parameters for surface plots
  `zoom`(*args, **kwargs) | zoom to parameter which can be any recognized string
  `zoomtofit`() | zoom the image to fit the display

  Methods Documentation

  `aimexam`()

    show current parameters for aperture photometry

  `alignwcs`(**kwargs)

    align frames with wcs

  `blink`(**kwargs)
  `cimexam`()

    show current parameters for column plots

  `clear_contour`()
  `close`()

    close the window and end connection

  `cmap`(**kwargs)

    Set the color map table to something else, in a defined list of options

  `colorbar`(**kwargs)

    turn the colorbar on the screen on and off

  `contour`(**kwargs)

    show contours on the window

  `contour_load`(*args)

    load contours from a file

  `crosshair`(**kwargs)

    Control the current position of the crosshair in the current frame, crosshair mode is turned on

  `cursor`(**kwargs)

    move the cursor in the current frame to the specified image pixel, it will also move selected regions

  `disp_header`(**kwargs)

    Display the header of the current image to a window

  `eimexam`()

    show current parameters for contour plots

  `frame`(*args, **kwargs)

    move to a frame

  `get_data`()

    return a numpy array of the data in the current window

  `get_data_filename`()

    return the filename for the data in the current window

  `get_frame_info`()

    return more explicit information about the data displayed in the current frame

  `get_header`()

    return the current fits header as a string, or None if there’s a problem

  `get_viewer_info`()

    Return a dictionary which has information about all frames loaded with data

  `grid`(*args, **kwargs)

    convenience to turn the grid on and off, grid can be flushed with many more options

  `hideme`()

    lower the display window

  `himexam`()

    show current parameters for histogram plots

  `imexam`()

    run imexamine with user interaction. At a minimum it requires a copy of the data array

  `jimexam`()

    show current parameters for 1D fit line plots

  `kimexam`()

    show current parameters for 1D fit column plots

  `limexam`()

    show current parameters for line plots

  `load_fits`(*args, **kwargs)

    convenience function to load fits image to current frame

  `load_mef_as_cube`(*args, **kwargs)

    Load a Mult-Extension-Fits image one frame as a cube

  `load_mef_as_multi`(*args, **kwargs)

    Load a Mult-Extension-Fits image into multiple frames

  `load_region`(*args, **kwargs)

    Load regions from a file which uses ds9 standard formatting

  `load_rgb`(*args, **kwargs)

    load three images into a frame, each one for a different color

  `make_region`(*args, **kwargs)

    make an input reg file with [x,y,comment] to a DS9 reg file, the input file should contains lines with x,y,comment

  `mark_region_from_array`(*args, **kwargs)

    mark regions on the viewer with a list of tuples as input

  `match`(**kwargs)

    match all other frames to the current frame

  `mimexam`()

    show the current parameters for statistical regions

  `nancolor`(**kwargs)

    set the not-a-number color, default is red

  `panto_image`(*args, **kwargs)

    convenience function to change to x,y images coordinates using ra,dec x, y in image coord

  `panto_wcs`(*args, **kwargs)

    pan to wcs coordinates in image

  `plotname`(filename=None)

    change or show the default save plotname for imexamine

  `readcursor`()

    returns image coordinate postion and key pressed, in the form of x,y,str with 0arrar offset

  `rimexam`()

    show current parameters for curve of growth plots

  `rotate`(*args, **kwargs)

    rotate the current frame (in degrees)

  `save_header`(*args, **kwargs)

    save the header of the current image to a file

  `save_regions`(*args, **kwargs)

    save the regions on the current window to a file

  `save_rgb`(*args, **kwargs)

    save an rgb image frame that is displayed as an MEF fits file

  `scale`(*args, **kwargs)

    Scale the image on display.The default zscale is the most widely used option

  `set_region`(*args, **kwargs)

    display a region using the specifications in region_string

  `setlog`(filename=None, on=True, level=10)

    turn on and off imexam logging to the a file

  `show_window_commands`()

    print the available commands for the selected display application

  `showme`()

    raise the display window

  `showpix`(*args, **kwargs)

    display the pixel value table, close window when done

  `snapsave`(*args, **kwargs)

    create a snap shot of the current window and save in specified format. If no format is specified the filename extension is used

  `unlearn`()

    unlearn all the imexam parameters and reset to default

  `valid_data_in_viewer`()

    return True if a valid file or array is loaded in the current viewing frame

  `view`(*args, **kwargs)

    Display numpy image array

  `wimexam`()

    show current parameters for surface plots

  `zoom`(*args, **kwargs)

    zoom to parameter which can be any recognized string

  `zoomtofit`()

    zoom the image to fit the display