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

Add notebooks for brake analysis #120

Draft
wants to merge 12 commits into
base: develop
Choose a base branch
from
Draft

Conversation

PaulinaLSST
Copy link

No description provided.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,581 @@
{
Copy link
Member

@b1quint b1quint Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cell is being repeated four times in the notebook. I suggest converting it into a function.

I use the DRY (don't repeat yourself). If you repeat a code three times, it is better to write a function for it.


Reply via ReviewNB

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but it happens when I try to convert it to a function. I get an error related to the 'await' command, which doesn't retrieve any data. I have never used it before, I will explored deeply into this. Do you have any tips for me?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From now on, the data is download at once, and then it is processed by the script.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is another option to query EFD data without using async functions. Try this:

from lsst.summit.utils.efdUtils import makeEfdClient, getEfdData

And, then, something like this:

start = Time("2024-03-09T10:00:00Z", scale="utc", format="isot")
end = Time("2024-03-11T06:00:00Z", scale="utc", format="isot")

df_az = getEfdData(
    client,
    "lsst.sal.MTMount.azimuth",
    columns=["actualPosition", "actualTorque"],
    begin=start,
    end=end,
)

This should help you wrapping this part into a function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wau! that will help a lot. :)

@@ -0,0 +1,581 @@
{
Copy link
Member

@b1quint b1quint Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a case where we are interested in seeing Elevation only. As the log message says, we are going from elevation 20º up to 80º and pressing the e-stop halfway. Azimuth is not used here and we can remove for this case.

I suggest we do the same for the other cases. They are usually interesting in one of the two axes.

I suggest you try to isolate the test too. Here, for example, we are interested in the slew that goes from 20º to 80º. Everything before and after that is just noise for the reader. Maybe start a few seconds before the slew begin and go a few seconds after it is complete.


Reply via ReviewNB

@@ -0,0 +1,581 @@
{
Copy link
Member

@b1quint b1quint Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, this is already super good and we can start using it. As you mention, the next step would be to collect an event and show it in the plots.

I recommend you use the logevent_error event from MTMount . The only information you need from it is its timestamp. You should be able to add a vertical line with plt.axvline(x_position) or, if you are using axes instead, ax.axvline(x_position) . No need to other log errors, I think.

In addition, we are interested in learning how long did the TMA move after this event until it stopped. So we need to define a criteria that says that the telescope stopped based solely in the actualPosition . Maybe we can use the actual velocity too.


Reply via ReviewNB

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to define a criteria to determined how long TMA moves after a e-stop. Pending

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

Successfully merging this pull request may close these issues.

None yet

2 participants