def BackgroundProfile(binsz): background, mask, signifiance = Run(correlation_radius = correlation_radius, significance_threshold=significance_threshold, mask_dilation_radius=mask_dilation_radius, number_of_iterations=50, data_image = data_image) background = background[1] glons = np.arange(LonLow, LonHigh+binsz, binsz) glon_bounds = Table() glon_bounds['CHANNEL'] = np.arange(len(glons) - 1) glon_bounds['GLON_MIN'] = np.float64(glons[:-1]) glon_bounds['GLON_MAX'] = np.float64(glons[1:]) data = compute_longitude_profile(glon_bounds = glon_bounds, binsz=binsz, image=background, datatype=2, emission=4, tev=0) return data
def GeneralProfile(binsz, filename): """This should be improved to avoid hard-coded filenames""" data_image = fits.open(filename) data_image= data_image[1] glons = np.arange(LonLow, LonHigh+binsz, binsz) glon_bounds = Table() glon_bounds['CHANNEL'] = np.arange(len(glons) - 1) glon_bounds['GLON_MIN'] = np.float64(glons[:-1]) glon_bounds['GLON_MAX'] = np.float64(glons[1:]) data = compute_longitude_profile(glon_bounds = glon_bounds, binsz=binsz, image=data_image, datatype=2, emission=4, tev=0) return data