XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


hkauxplot (hkauxplot-4.8.2) [xmmsas_20230412_1735-21.0.0]


Algorithm

subroutine hkauxplot

  subroutine getparams      # read the parameters from hkauxplot.par file
  subroutine check_table    # open selected input file and check

  subroutine get_y_cols	    # extract selected y-axis columns from infile
   foreach y_column
    fill_y_axis_array
   next

  if (.not. auxfile) then
   if (TIME column) then
    if (string) then
     call ert2seconds      # convert '1999-12-15T12:00:00.000' to obt
     fill x-axix array
    else
     fill x-axis array
    end if
   else 
    fill x-axis array	
   end if
  else
   if (FRAME column) then
    sort frames by ccd     # segregate columns by frame numbers and CCDID
    fill x-axis array
    if (convert) then
     call oal_frametoObt   # convert frame to time using framecounter_to_OBT
    end if
   else
    fill x-axis array 
   end if
  end if

  if (gtiyes) then	
   call get_gti              # open GTI file selected, extract GTIs
   equate time and gtitime   # create gti_array, 1 or 0 if 'GTI' or not
  end if 

  create_plot_titles       # use keywords from infile for plot labels

  call do_plot

   subroutine do_plot 

    open_plot_device

    Loop:

     start_new_page            # plot_title

     get_sub_interval_x

     do column = 1 , ncolumns

       if (gtiyes) then

        do ccdno = 1 , n_selected_ccds

          plot_panel
          if (gtiyes) then
           plot_gti_panel
           foreach ON_GTI_area
            fill_gti_area
           next
          end if

          if (last_panel) then
           finish_page
           start_new_page
          end if

        end do

       else

        plot_panel
        if (last_panel) then
          finish_page
          start_new_page
        end if

      end do

       if (last_panel) then
         if (points_remain) then
           finish_page
           start_new_page
         end if
       end if

     next
    close_plot
  end subroutine do_plot

end subroutine hkauxplot



XMM-Newton SOC -- 2023-04-16