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

metadata doesn't propagate from LateralProfile to Curve #17

Open
grzanka opened this issue Feb 4, 2016 · 6 comments
Open

metadata doesn't propagate from LateralProfile to Curve #17

grzanka opened this issue Feb 4, 2016 · 6 comments
Assignees

Comments

@grzanka
Copy link
Collaborator

grzanka commented Feb 4, 2016

See this:

>>> from beprof import curve
>>> from beprof import profile
>>> p1 = profile.LateralProfile( [[0,0],[1,1]], generator="sin")
>>> print(p1)
shape: (2, 2)
X : [0.000,1.000]
Y : [0.000000,1.000000]
Metadata : {'generator': 'sin'}
 FWHM = nan None
Center = nan Penumbra = [0.800,nan]
>>> c1 = curve.Curve(p1)
>>> print(c1)
shape: (2, 2)
X : [0.000,1.000]
Y : [0.000000,1.000000]
Metadata : {}

@antnieszka
Copy link
Contributor

@grzanka I think we removed LateralProfile class, so this issue is no longer valid.

@grzanka
Copy link
Collaborator Author

grzanka commented Jun 5, 2016

try to reproduce it in another way - create own class which inherits from Curve and check if it behaves well

@antnieszka antnieszka modified the milestone: 0.1.0 Jun 6, 2016
@antnieszka
Copy link
Contributor

Still valid:

class TestCurve(Curve):
    pass

def main2():
    p1 = TestCurve([[0, 0], [1, 1]], generator="sin")
    print(p1)
    c1 = Curve(p1)
    print(c1)

Returns:

C:\Python\Python35-32\python.exe C:/Users/ant6/PycharmProjects/beprof/beprof/curve.py
shape: (2, 2)
X : [0.000,1.000]
Y : [0.000000,1.000000]
Metadata : {'generator': 'sin'}
shape: (2, 2)
X : [0.000,1.000]
Y : [0.000000,1.000000]
Metadata : {}

@grzanka
Copy link
Collaborator Author

grzanka commented Jul 3, 2016

Can you fix it quickly ? If yes, do it, otherwise let's postpone it to next release.

@antnieszka
Copy link
Contributor

I think this may require some additional code refactoring: https://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/
I'll move it to next milestone.

@antnieszka antnieszka modified the milestones: Next release, 0.1.0 Jul 3, 2016
@grzanka
Copy link
Collaborator Author

grzanka commented Jul 3, 2016

OK

@antnieszka antnieszka self-assigned this Nov 8, 2016
@antnieszka antnieszka modified the milestones: Next release, 0.1.1 Dec 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants