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

How to implement the funtionality? #21

Open
HojaeAhn opened this issue Jan 25, 2022 · 7 comments
Open

How to implement the funtionality? #21

HojaeAhn opened this issue Jan 25, 2022 · 7 comments
Assignees

Comments

@HojaeAhn
Copy link
Collaborator

HojaeAhn commented Jan 25, 2022

I want to raise an issue of where the algorithmic code should go.
I drew a simple diagram representing my question.

howto

Here are two options to put the algorithmic code: 1) in the commands (e.g. /lvmagp/python/lvmagp/actor/commands/slew.py) 2) in another python file (e.g. lvmagp/python/lvmagp/actor/commfunc.py, hereafter I'll say it as 'module file')
The science team members don't want to use cluplus and deal with actors, and they just want to use the function inside the API module (like the bottom text box). So I agree on the need for an additional file (module file) separated from the command-defining file (the right text box of each method).
The point is we can put the algorithmic code inside either the command-defining file or module file. If we put the algorithms in the command file, then inside the module file, we just make an AMQP client and call the agp function. If we put the algorithms in the module file, we call the function in API when the command is executed.

I interpreted that your intention in issues was the second one, and I am revising the code following that way. On the other side, according to my understanding, Changgon is making lvmscp using the first method, and it may reduce the developing time because it just uses the existing command.
So I want to show both methods and hear your opinion.

@wasndas
Copy link
Collaborator

wasndas commented Jan 26, 2022

Actually I do have a more radical 3rd aproach, throw out the slew command,
because it seems to be implemented in lvmops:tel_interface
Maybe the lvmagp should just guide and expect that the telescope is a the right position
and it does only guiding and focusing.

@wasndas
Copy link
Collaborator

wasndas commented Jan 26, 2022

... but actually same thing for the focus functionality lvmops:autofocus :-]

@wasndas
Copy link
Collaborator

wasndas commented Jan 26, 2022

Maybe I misunderstood the question, it was not lvmagp centric. It was probably more a general question about duplicated implementation in lvmops and lvmagp + lvmscp.

Algorithmic code and parameters should be seperate in a class/module (Method2), so that it can be used by others. Thats why I created this lvmtipo where I put all this type of code, eg fieldangle, targetpos, ... Then you can also add easily a command line interface for manual testing.

Since lvmtipo doesnt have any dependecies to other lvmXXX it can be used by them and it doesnt use any actor clients.

@HojaeAhn
Copy link
Collaborator Author

HojaeAhn commented Feb 3, 2022

OK, I could understand what you mean. I will put the algorithmic code in the module file.
By the way, as you mentioned here and I mentioned in the last meeting, we can put the algorithmic code in lvmops directly without lvmagp. Then the lvmops control all devices including the scope of lvmscp and lvmecp. In other words, the lvmops will be equivalent to the sum of lvmagp, lvmscp, and lvmecp. So it was a more fundamental question about the needs of intermediate-level actors like lvmagp. I guess what I'm making, the module file of lvmagp (commfunc.py), is a part of lvmops and it might be merged into lvmops in the future.

@wasndas
Copy link
Collaborator

wasndas commented Feb 3, 2022

Yes I do fully agree, we should discuss things like that on Monday. I have put it already in my list of discussion points here as lvmagp vs lvmops controlling lvmpwi

Btw, I have created a github super project with all lvm packages involved here, if I have missed one package please tell me.

@HojaeAhn
Copy link
Collaborator Author

HojaeAhn commented Feb 3, 2022

I would like to suggest adding an agenda about the identity of the lvmops; Should the lvmops be the actor or the module? I have regarded this as the most important point to decide the development direction.
I checked the lvm superproject, and it seems there is no missing package :)

@wasndas
Copy link
Collaborator

wasndas commented Feb 3, 2022

Yes. Ill do.

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