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

Deep copy functions from one dataset to a multiple ones #28

Closed
Fellow-baka opened this issue Aug 26, 2019 · 2 comments
Closed

Deep copy functions from one dataset to a multiple ones #28

Fellow-baka opened this issue Aug 26, 2019 · 2 comments

Comments

@Fellow-baka
Copy link

Hello again.
Is there a way to copy all the functions from one dataset to a multiple ones?
I want something like this: @*.F = @0.F

I want to put some functions in first dataset by the hand, fix some variables, copy this functions to all other datasets and fit it all through @*: fit

Thanks in advance!

@wojdyr
Copy link
Owner

wojdyr commented Aug 26, 2019

Hi @Fellow-baka

for one dataset it could be done with:

@1.F=copy(%0.F)

If this works for copying functions from @0 to @1, here is a one-line Lua script that does the same for all datasets. It can be run as a Fityk command:

lua for i=1,F:get_dataset_count()-1 do F:execute('@%d.F=copy(@0.F)' % i) end

@Fellow-baka
Copy link
Author

Thank you!
I (and other users, probably) would be grateful to have a bit of syntactic sugar for such a task.

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