Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anomalous txt files brake the epiclog_read #22

Open
andreaa93 opened this issue Dec 3, 2024 · 4 comments
Open

anomalous txt files brake the epiclog_read #22

andreaa93 opened this issue Dec 3, 2024 · 4 comments

Comments

@andreaa93
Copy link
Member

I found such a file:

Local fluxopen = 0
Local fluxclosed1 = 0
Local fluxclosed2 = 0
Local flux = 0
Local currT =0 
Local mT = 15 'measure time'
Local wT = 30  'waiting time'
 

ReadAvgGauge(MIG, mT, fluxclosed1)
Open(Ga)
Wait(wT)
ReadAvgGauge(MIG, mT, fluxopen)
PeekDevice(Ga.PID, MV, currT)

Close(Ga)
'Wait(5)
'ReadAvgGauge(MIG, mT, fluxclosed2)

flux = fluxopen - fluxclosed1
SaveFluxToFile(Ga, currT, flux)
'flux = fluxopen - fluxclosed2
'SaveFluxToFile(Ga, currT, flux)

this has a txt extension and so it gets parsed by epiclog_read_batch. It has a non recognised format so it leads so an error raising

Can you @haltugyildirim make the function not fail if an anomalous file is detected?
You can just ignore it if it is not compliant

Let me know, thanks

@oliverbierwagen
Copy link

I found such a file:

Local fluxopen = 0
Local fluxclosed1 = 0
Local fluxclosed2 = 0
Local flux = 0
Local currT =0 
Local mT = 15 'measure time'
Local wT = 30  'waiting time'
 

ReadAvgGauge(MIG, mT, fluxclosed1)
Open(Ga)
Wait(wT)
ReadAvgGauge(MIG, mT, fluxopen)
PeekDevice(Ga.PID, MV, currT)

Close(Ga)
'Wait(5)
'ReadAvgGauge(MIG, mT, fluxclosed2)

flux = fluxopen - fluxclosed1
SaveFluxToFile(Ga, currT, flux)
'flux = fluxopen - fluxclosed2
'SaveFluxToFile(Ga, currT, flux)

this has a txt extension and so it gets parsed by epiclog_read_batch. It has a non recognised format so it leads so an error raising

Can you @haltugyildirim make the function not fail if an anomalous file is detected? You can just ignore it if it is not compliant

Let me know, thanks

This is a receipe file as I decided that each receipe we are using should also be uploaded.
This functionality is not implemented yet - so this file should be ignored - as it is not referenced in the xls config file anyways.

@andreaa93
Copy link
Member Author

yes, it should be ignored without raising any error, to avoid the processing to result in a failure

@haltugyildirim
Copy link
Contributor

what is the name of this file? We can write an if condition to ignore the naming.

@andreaa93
Copy link
Member Author

it hasn't got always the same name.

It would be good if you manage in the function epiclog_read_batch to ignore files that do not comply to the timeseries format.

So to say, ignore Messages.txt, Shutter.txt, Fitting.txt and also this one. Not by their name but by their content

In this way you solve my hardcoding of filenames in line 106

ok @haltugyildirim ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants