Comments (10)
from lightcurves.
Thanks a lot
It worked well.
In the baseline method, the QB flux level is not seen. Can we get the value from Hopobject?
from lightcurves.
Hi @aminasuneer
The updated way to call this is:
hops_bl = lc.find_hop('baseline')
Please let me know if this works for you.
Could you also let me know how where/how you got the old version of the tutorial code, so I can update it? Did you use pip install or download the GitHub repository? Sorry for the inconvenience!
from lightcurves.
Hii
Thanks for the reply
I have downloaded the zipped source code from this page and I have done with the newest version uploaded.
I changed the step in to hops_bl = lc.find_hop('baseline')
But I am still not getting the hops values like start, peak and end.
''hops_bl = lc.find_hop('baseline')
print('HOP: [start, peak, end]')
print(hops_bl)
lc.plot_hop('baseline')
lc.plot_bblocks()
plt.legend()
HOP: [start, peak, end]
[<HOP.Hopject object at 0x7fd171db06a0>, <HOP.Hopject object at 0x7fd171db0a30>, <HOP.Hopject object at 0x7fd171db0b80>, <HOP.Hopject object at 0x7fd171d3e640>]''
I downloaded the code directly from this page and have not performed pip install.
And also since I got an import error with lines as
from lightcurves.LC import LightCurve
from lightcurves.HOP import Hopject
so I changed these in to
from LC import LightCurve
from HOP import Hopjec
If there is any installation procedure rather than downloading, please let me know
Thank you so much for replying
from lightcurves.
Ok, I see what's happening and will fix this in the tutorial, thanks for pointing it out!
Your code is now working as it should. In order to plot correctly, try: lc.plot_hop()
without the argument.
hops_bl
is a list of Hopjects. That is a new class (see HOP.py) with interesting attributes. For example, to reproduce the old code and get the start, peak and end time of the HOP, try: print(hop.start_time, hop.peak_time, hop.end_time)
. You can also directly access, for instance, the peak flux and the asymmetry measure of the HOP with hop.peak_flux
and hop.asym
etc.
Downloading the zipped source code is fine, sorry about the old version again -- I am updating it now. I recommend downloading it again after the new commit. Please let me know if you still run into problems then. Another option would be to install the code with pip, see https://pypi.org/project/lightcurves/ but that doesn't have the tutorial at the moment.
Hope the code is useful to you and you get to analyze some interesting light curves! :)
from lightcurves.
ok feel free to go ahead and download the code again -- it should all run smoothly now.
from lightcurves.
While running this in it...
hop = hops_bl[0]
it shows this error..
Traceback (most recent call last):
File "/home/sajad/SAJADB21348+30B/Baysian_block_analysis/Bysn_blk_anlys_codes/lightcurves-main/basian.py", line 34, in
print(hop.start_time, hop.peak_time, hop.end_time)
NameError: name 'hop' is not defined
How to solve this issue.
from lightcurves.
Hi @aminasuneer,
glad to hear that!
In the baseline method, the QB flux level is not seen. Can we get the value from Hopobject?
An instance of the class LightCurve has the attribute baseline, see lines 322 to 327 in the code. This is what is used as threshold value for the HOP baseline method. Does that answer your question?
from lightcurves.
Hi @sajadphysics , thank you for reaching out as well. From the error message you provided it looks like you have not defined 'hop' before you are printing its attributes. Could you provide more context? Are you also working in the tutorial and did you download it form the most recent version?
from lightcurves.
from lightcurves.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightcurves.