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

Problem with variability index #113

Open
astrolog1986 opened this issue Jan 18, 2018 · 5 comments
Open

Problem with variability index #113

astrolog1986 opened this issue Jan 18, 2018 · 5 comments

Comments

@astrolog1986
Copy link

Dear All,

I am trying to calculate the variability index but it gives an error (below).
It fails to read the last config file (I tried for several different light curves and
always the problem is with the last bin) but that file exists.

LightCurve]: Write to Ascii file :
/home/Comp_2/LightCurve_14bins/source_results.dat

************************************************************

*** Computing Variability index ***

************************************************************

Traceback (most recent call last):
File "/opt/enrico/bin/enrico_plot_lc", line 30, in
lc.PlotLC()
File "/opt/enrico/enrico/lightcurve.py", line 197, in PlotLC
self._PlotLC()
File "/opt/enrico/enrico/lightcurve.py", line 395, in _PlotLC
self.VariabilityIndex()
File "/opt/enrico/enrico/lightcurve.py", line 449, in VariabilityIndex
ResultDicDC = utils.ReadResult(self.config)
File "/opt/enrico/enrico/utils.py", line 231, in ReadResult
lines = open(_dump_filename(config)).readlines()
IOError: [Errno 2] No such file or directory:
'/home/Comp_2/LightCurve_14bins//source_PowerLaw_444569076_460339203_2240_300000_NS_LC_13.results'

Can you please help to solve this problem?

Thank you

@davidsanchez
Copy link
Member

Hi

it seems that the LC point 13 failed. did you check the corresponding log file?
cheers
david

@astrolog1986
Copy link
Author

Dear David,

Thank you for your answer! Yes, I checked there is no warning or error (below is the full output from enrico). Also I send the results in source_PowerLaw_444569076_460339203_2240_300000_NS_LC_13.results.

Thanks in advance!
full output:
enrico_plot_lc source.conf
[LightCurve]: Running LC with 14 bins
Bin 0 Start= 239557417.0 Stop= 255327544.643
Bin 1 Start= 255327544.643 Stop= 271097672.286
Bin 2 Start= 271097672.286 Stop= 286867799.929
Bin 3 Start= 286867799.929 Stop= 302637927.571
Bin 4 Start= 302637927.571 Stop= 318408055.214
Bin 5 Start= 318408055.214 Stop= 334178182.857
Bin 6 Start= 334178182.857 Stop= 349948310.5
Bin 7 Start= 349948310.5 Stop= 365718438.143
Bin 8 Start= 365718438.143 Stop= 381488565.786
Bin 9 Start= 381488565.786 Stop= 397258693.429
Bin 10 Start= 397258693.429 Stop= 413028821.071
Bin 11 Start= 413028821.071 Stop= 428798948.714
Bin 12 Start= 428798948.714 Stop= 444569076.357
Bin 13 Start= 444569076.357 Stop= 460339204.0

[LightCurve]: Reading files produced by enrico
TROOT::Append:0: RuntimeWarning: Replacing existing TH1: ghnpred
(Potential memory leak).
Info in TCanvas::Print: eps file
/home/Comp_2/LightCurve_14bins/source_Npred.eps
has been created
Info in TCanvas::SaveSource: C++ Macro file:
/home/Comp_2/LightCurve_14bins/source_Npred.C
has been generated
Info in TCanvas::Print: eps file
/home/Comp_2/LightCurve_14bins/source_TS.eps
has been created
Info in TCanvas::SaveSource: C++ Macro file:
/home/Comp_2/LightCurve_14bins/source_TS.C
has been generated
TROOT::Append:0: RuntimeWarning: Replacing existing TH1: ghflux
(Potential memory leak).
[LightCurve]: Flux vs Time: infos
[LightCurve]: Fit with a constant function
Chi2 = 30.714627874 NDF = 13
probability of being cst = 0.00371087695432

[LightCurve]: Calculation of Fvar (Vaughan et al. 2003)
Fvar = 0.248645193994 +/- 0.0900072656727

Info in TCanvas::Print: eps file
/home/Comp_2/LightCurve_14bins/source_LC.eps
has been created
Info in TCanvas::SaveSource: C++ Macro file:
/home/Comp_2/LightCurve_14bins/source_LC.C
has been generated
[LightCurve]: Write to Ascii file :
/home/Comp_2/LightCurve_14bins/source_results.dat

************************************************************

*** Computing Variability index ***

************************************************************

Traceback (most recent call last):
File "/opt/enrico/bin/enrico_plot_lc", line 30, in
lc.PlotLC()
File "/opt/enrico/enrico/lightcurve.py", line 197, in PlotLC
self._PlotLC()
File "/opt/enrico/enrico/lightcurve.py", line 395, in _PlotLC
self.VariabilityIndex()
File "/opt/enrico/enrico/lightcurve.py", line 449, in VariabilityIndex
ResultDicDC = utils.ReadResult(self.config)
File "/opt/enrico/enrico/utils.py", line 231, in ReadResult
lines = open(_dump_filename(config)).readlines()
IOError: [Errno 2] No such file or directory:
'/home/Comp_2/LightCurve_14bins//source_PowerLaw_444569076_460339203_2240_300000_NS_LC_13.results'

Results in source_PowerLaw_444569076_460339203_2240_300000_NS_LC_13.results

dPrefactor- -5.85126099444e-12
Scale 481.170349
Optimizer NEWMINUIT
Emin 2240.0
Index -2.31545985034
Emax 300000.0
tmax 460339204.0
dScale 0.0
TS 110.848895557
ModelType PowerLaw
SrcName source
Flux 1.46108759552e-09
Npred 31.4248302566
log_like -38587.5740188
dIndex 0.0
dPrefactor+ 6.64029120663e-12
dFlux 3.01310234163e-10
dPrefactor 6.23941328572e-12
tmin 444569076.357
Prefactor 3.02450576179e-11

@davidsanchez
Copy link
Member

looking at the output the code is trying to open the .results file and can't find it
IOError: [Errno 2] No such file or directory:
'/home/Comp_2/LightCurve_14bins//source_PowerLaw_444569076_460339203_2240_300000_NS_LC_13.results'

did you check on other binnings?

@astrolog1986
Copy link
Author

Dear David,

Thank you for your answer! Yes I tried 20 bins but again error in the last been.
Yes it is trying to open the file of the last bin and can not find it but it is there....

@davidsanchez
Copy link
Member

Hi
after several test, I want not able to reproduce this problem

did you ran the SED first?

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

2 participants