% % file: e0102_acis_data.sl 10/28/12 - dd % % Demo script to load E0102 events into Event2D, % the two axes are sky coordinates, X and Y. % Note that the Energy will be loaded as a third coordinate as well. % % - - - % Usage: % % [linux] hydra % ... % hydra> .source e0102_data % ... % click on the "Done" button on the pane below the image % hydra> % % - - - % Load the event file as desired using e2d_load_data: % Note: can get summary of Event2D commands by doing: % hydra> e2d_help; % and can usually get simple command line help by invoking a desired command % with no arguments, e.g.: % hydra> e2d_load_data; % Usage: e2d_load_data(FITSfile,ColX,ColY, [xyorigins], [partordsrc], [eminemax]); % The values for xyorigins are the center of E0102 in sky coord.s for % this observation and can be gotten using ds9. % Can invoke shell commands from isis/hydra with a "!", e.g., by doing: % hydra> !ds9 obs_3545_evt1.fits & % Picked X,Y for a bright portion of the inner end of the "Q stroke". % set the dataset number: (0 to 19) % (This will be the default dataset used by several of the following commands, % it also /instead can be specified as the first argument to most commands.) e2di = 1; % load the data: e2d_load_data("obs_3545_evt1.fits", "X", "Y", [4177.0, 3965.0], NULL, [0.4,5.0]); % load/setup an arf corresponding to this instrument/observation: e2d_setup_arf("obs_3545_extract.warf"); % FYI, the data etc can be directly accessed via the two array % structures, see: % hydra> print(e2d_data[1]); % and: % hydra> print(e2d_meta[1]); % Set the viewing range and cell size for the dataset, in arc seconds: e2d_set_view([-30.0, 30.0, 0.75], [-30.0, 30.0, 0.75]); % This range etc info is kept in variables in the e2d_view array of % structures, see: % hydra> print(e2d_view[1]); % Summary of the data that are loaded: e2d_list_data; % look at the 2D data image: e2d_view_data; % Below, note the use of compiler directives ("#...") % as a useful way to comment out many lines. #iffalse % The image will be written to a file if save_image_file % is defined before calling 'view_data : save_image_file="e0102_acis_image.png"; e2d_view_data; % Can also look at the 1D projections of the data along X, Y and Energy: e2d_plot_1d(1,1); % project datset 1 onto the 1st(X) axis e2d_plot_1d(1,2); % datset 1, 2nd(Y) axis e2d_plot_1d(1,3); % datset 1, Energy axis #endif % OK, data are loaded...