Skip to content

Commit

Permalink
Update PeakSelector_v2.py
Browse files Browse the repository at this point in the history
PeakInspector debe estar en la misma carpeta que PeakSelector y coge el PeakInspector.ini de la carpeta config
  • Loading branch information
DiegoMenaSaurio committed Aug 6, 2024
1 parent 48ea959 commit d817a94
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions PeakSelector_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import pandas as pd
import numpy as np
import plotly.graph_objs as go
import traceback


pd.options.mode.chained_assignment = None # default='warn'
Expand Down Expand Up @@ -93,12 +92,9 @@ def extract_slopes(df_hist,x2,m,intercept,dm0,dm1):

return df_result

except ValueError as e:
except ValueError:

logging.error('Check dm values on the config. Your spectra looks smaller')
# get the traceback information
tb = traceback.extract_tb(e.__traceback__)
for frame in tb: logging.error(f"File: {frame.filename}, Line: {frame.lineno}, Function: {frame.name}, Error: {e}")
sys.exit()


Expand Down Expand Up @@ -263,8 +259,8 @@ def peakinspector():

infile=args.infile[:-15] + 'DMHistogram_threshold.tsv'

peaki=os.path.join(os.path.dirname(__file__),'Tools\\PeakInspector.py')
peakiconf=os.path.join(os.path.dirname(__file__),'Tools\\PeakInspector.ini')
peaki=os.path.join(os.path.dirname(__file__),'PeakInspector.py')
peakiconf=os.path.join(os.path.dirname(__file__),'config\\PeakInspector.ini')

# execution=r"python {a} -i{b} -c{c}".format(a=path,b=outfile,c=config)
execution=r"python {a} -i{b} -c{c}".format(a=peaki, b=infile, c=peakiconf)
Expand Down

0 comments on commit d817a94

Please sign in to comment.