-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: develop
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Cleaning the workspace, due files have not converge
No diff in versions
File corrupted - trying to recover
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
@@ -0,0 +1,581 @@ | |||
{ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. :)
notebooks/tel_and_site/subsys_req_ver/tma/SITCOM-1120_az_brake_analysis.ipynb
Show resolved
Hide resolved
@@ -0,0 +1,581 @@ | |||
{ |
There was a problem hiding this comment.
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 @@ | |||
{ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
…ions needs to be rewritten
No description provided.