Skip to content
Snippets Groups Projects
Commit 0c7561fd authored by Stephane Chavin's avatar Stephane Chavin
Browse files

add_start_stop

parent 4f6e95c4
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,9 @@ df['midl'] = (df.x*DUREE_SPECTRO)+(df.idx.astype(int)) ...@@ -49,6 +49,9 @@ df['midl'] = (df.x*DUREE_SPECTRO)+(df.idx.astype(int))
df['freq_center'] = (1-df.y)*(SR/2) df['freq_center'] = (1-df.y)*(SR/2)
df['freq_min'] = df.freq_center - (df.h*(SR/2))/2 df['freq_min'] = df.freq_center - (df.h*(SR/2))/2
df['freq_max'] = df.freq_center + (df.h*(SR/2))/2 df['freq_max'] = df.freq_center + (df.h*(SR/2))/2
df['start'] = df.midl - (df.w * DUREE_SPECTRO)/2
df['stop'] = df.midl + (df.w * DUREE_SPECTRO)/2
df['duration'] = df.stop - df.start
df.to_csv(os.path.join(outdir,str(out_file+'.csv')), index= False) df.to_csv(os.path.join(outdir,str(out_file+'.csv')), index= False)
print('saved as ',os.path.join(outdir,str(out_file+'.csv'))) print('saved as ',os.path.join(outdir,str(out_file+'.csv')))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment