You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseChannelError('Channel numbers must be in a one-dimensional array of positive integers'
302
-
'(including zero).')
298
+
raiseChannelError('Channel numbers must be in a one-dimensional array of positive integers (including zero), with a '
299
+
'length equal to the number of channel in the matrix.')
300
+
303
301
304
302
if (channel_array[1:] -channel_array[:-1] !=1).any():
305
-
yield ('Warning: Channel numbers do not uniformly increment by one.\n'
306
-
' Please check for correctness.')
303
+
print('WARNING: Channel numbers do not uniformly increment by one.')
307
304
308
305
self._channels=channel_array
309
306
@@ -355,9 +352,11 @@ def trim_response(self,
355
352
356
353
# Print if any trimming happens
357
354
ifempty_inputs.sum() >0:
358
-
print(f'Triming the response matrix because it contains lines with only values <= {threshold}.\n Now min energy={self.energy_edges[0]} and max_input={self.energy_edges[-1]}')
355
+
print(f'Triming the response matrix because it contains rows with only values <= {threshold}.\n '
356
+
f'Now min_energy={self.energy_edges[0]} and max_energy={self.energy_edges[-1]}')
359
357
ifempty_channels.sum() >0:
360
-
print(f'Triming the response matrix because it contains columns with only values <= {threshold}.\n Now min_channel={self.channels[0]} and max_channel={self.channels[-1]}')
358
+
print(f'Triming the response matrix because it contains columns with only values <= {threshold}.\n '
359
+
f'Now min_channel={self.channels[0]} and max_channel={self.channels[-1]}')
361
360
362
361
# If ARF and RMF, trim them
363
362
ifhasattr( self , 'ARF' ):
@@ -478,9 +477,11 @@ def from_ogip_fits(cls,
478
477
channels=channels[ ~empty_channels ]
479
478
inputs=inputs[ ~empty_inputs ]
480
479
ifempty_inputs.sum() >0:
481
-
print(f'Triming the response matrix because it contains lines with only 0 values.\n Now min_input={inputs[0]} and max_input={inputs[-1]}')
480
+
print(f'Triming the response matrix because it contains rows with only 0 values.\n '
481
+
f'Now min_energy={inputs[0]} and max_energy={inputs[-1]}')
482
482
ifempty_channels.sum() >0:
483
-
print(f'Triming the response matrix because it contains columns with only 0 values.\n Now min_channel={channels[0]} and max_channel={channels[-1]}')
483
+
print(f'Triming the response matrix because it contains columns with only 0 values.\n'
484
+
f' Now min_channel={channels[0]} and max_channel={channels[-1]}')
484
485
485
486
# Get the edges of energies for both input and channel
0 commit comments