#NEWLINE# def to_hdf5_group( self , group , name ) : #NEWLINE# #INDENT# self . check_all_set ( ) #NEWLINE# nu = self . spectral_coord . to ( u . Hz , equivalencies = u . spectral ( ) ) . value #NEWLINE# tr = self . transmission . to ( u . one ) . value #NEWLINE# order = np . argsort ( nu ) #NEWLINE# nu = nu [ order ] #NEWLINE# tr = tr [ order ] #NEWLINE# nu0 = self . central_spectral_coord . to ( u . Hz , equivalencies = u . spectral ( ) ) . value #NEWLINE# alpha = self . alpha #NEWLINE# beta = self . _beta #NEWLINE# tr_norm = ( ( ( tr / ( dset ** ( 1 + beta ) ) ) / ( nu0 ** alpha ) ) / integrate ( nu , ( tr / ( nu ** ( ( 1.0 + alpha ) + beta ) ) ) ) ) #NEWLINE# tr_norm *= nu #NEWLINE# dset = group . create_dataset ( name , data = np . array ( list ( zip ( nu , tr , tr_norm ) ) , dtype = [ ( 'nu' , float ) , ( 'tr' , float ) , ( 'tr_norm' , float ) ] ) ) #NEWLINE# dset . attrs [ 'name' ] = np . string_ ( self . name ) #NEWLINE# dset . attrs [ 'alpha' ] = self . alpha #NEWLINE# dset . attrs [ 'beta' ] = self . _beta #NEWLINE# dset . attrs [ 'nu0' ] = self . central_spectral_coord . to ( u . Hz , equivalencies = u . spectral ( ) ) . value