Remove plot and higher point

This commit is contained in:
linarphy 2023-07-04 12:03:43 +02:00
parent 891883e5a8
commit 4a07b37e49
No known key found for this signature in database
GPG key ID: 3D4AAAC3AD16E79C

View file

@ -688,7 +688,9 @@ if intensity != None:
true_intensity_value = ( intensity_stairs.shape[0] - np.polyval( index_polyval , intensity_value ) ) * step true_intensity_value = ( intensity_stairs.shape[0] - np.polyval( index_polyval , intensity_value ) ) * step
final_intensity[index] = np.exp( true_intensity_value ) final_intensity[index] = np.exp( true_intensity_value )
if final_intensity[ index ] > np.exp( 2.2 ): if final_intensity[ index ] > np.exp( 2.2 ):
final_intensity[ index ] = np.exp( 2.2 )
if verbose: if verbose:
print( 'intensity calibration finished' ) print( 'intensity calibration finished' )
@ -701,8 +703,6 @@ if output == None:
else: else:
if verbose: if verbose:
print( 'storing result in ' + output ) print( 'storing result in ' + output )
plt.plot( final_intensity[ 1 : - 1 ] )
plt.show()
main_hdu = fits.PrimaryHDU( final_intensity[1:-1] ) # remove -1 main_hdu = fits.PrimaryHDU( final_intensity[1:-1] ) # remove -1
main_hdu.header[ 'CRVAL1' ] = wavelengths[0] main_hdu.header[ 'CRVAL1' ] = wavelengths[0]
main_hdu.header[ 'CDELT1' ] = wavelengths[1] - wavelengths[0] main_hdu.header[ 'CDELT1' ] = wavelengths[1] - wavelengths[0]