Remove display
This commit is contained in:
parent
7579a3dde1
commit
98efc87ee4
1 changed files with 4 additions and 22 deletions
24
spectrum.py
24
spectrum.py
|
@ -12,8 +12,8 @@ import pathlib
|
|||
from scipy.ndimage import rotate
|
||||
from astropy.io import fits
|
||||
|
||||
cache , filename , output , calibration , intensity_calibration
|
||||
, verbose , no_cache = None , None , None , None , None , False, False
|
||||
cache , filename , output , calibration = None , None , None , None
|
||||
intensity_calibration , verbose , no_cache = None , False, False
|
||||
if len( sys.argv ) < 2:
|
||||
raise Exception( 'spectrum.py: type \'spectrum.py -h\' for more information' )
|
||||
|
||||
|
@ -75,7 +75,7 @@ while i < len( argv ):
|
|||
\nParse a naroo spectrum fits' )
|
||||
exit()
|
||||
elif arg == '--version':
|
||||
print( '0.3' )
|
||||
print( '0.4' )
|
||||
exit()
|
||||
elif arg == '--verbose':
|
||||
verbose = True
|
||||
|
@ -110,8 +110,6 @@ if verbose:
|
|||
\n --verbose: True ( default to False)\
|
||||
\n\
|
||||
\n===========================================' )
|
||||
# TODO: check in advance file to check if exists or writeable
|
||||
|
||||
files = {}
|
||||
if calibration != None:
|
||||
files[ 'wavelength' ] = pathlib.Path( calibration )
|
||||
|
@ -126,7 +124,6 @@ for name , path in files.items():
|
|||
if name in [
|
||||
'wavelength',
|
||||
'intensity' ,
|
||||
'spectrum' ,
|
||||
] and not path.is_file():
|
||||
raise Exception(
|
||||
'spectrum.py: could not open the ' + name + ' file'
|
||||
|
@ -659,19 +656,11 @@ mean_bias = sp_convolve(
|
|||
axis = 0,
|
||||
) ,
|
||||
np.ones(
|
||||
(
|
||||
50,
|
||||
) ,
|
||||
) ,
|
||||
'same',
|
||||
) / 50
|
||||
|
||||
plt.plot( bias[ 'top' ] , label = 'top' )
|
||||
plt.plot( bias[ 'down' ] , label = 'down' )
|
||||
plt.plot( mean_bias , label = 'mean' )
|
||||
plt.legend()
|
||||
plt.show()
|
||||
|
||||
data[
|
||||
: ,
|
||||
spectrum[ 'x' ][ 'min' ] : spectrum[ 'x' ][ 'max' ]
|
||||
|
@ -683,13 +672,6 @@ data[
|
|||
if verbose:
|
||||
print( 'bias substraction finished' )
|
||||
|
||||
ETA_bias = np.load( 'ETA_bias.npy' )
|
||||
|
||||
plt.plot( mean_bias , label = 'spectrum' )
|
||||
plt.plot( ETA_bias , label = 'ETA' )
|
||||
plt.legend()
|
||||
plt.show()
|
||||
|
||||
mean_data = np.mean( data[
|
||||
spectrum[ 'y' ][ 'min' ] : spectrum[ 'y' ][ 'max' ],
|
||||
spectrum[ 'x' ][ 'min' ] : spectrum[ 'x' ][ 'max' ]
|
||||
|
|
Loading…
Reference in a new issue