log.axis_data.mlc.leaf_axes[40].plot_actual() # use whatever valid leaf number
Thank you both for the responses.The CSV file is from pylinac using the to_csv function. The algorithm positions and time were verified with the created CSV. Within the code I have it print out what it see's as a start position and end position, I then look at the CSV file to make sure the values are correct and they are, same with the time. If I take the difference of the starting and ending positions in the CSV, count how many snapshots it took and convert to seconds a hand calc also shows the same as the program.I understand the Dynalogs need to be scaled and it was my understanding that pylinac already accounts for this so there is no need to input a scaling factor within the code. The snippet of code in pyliac for dynalog conversion under the from_dlog function appears to already correct expected and actual positions. Do I still need to input a scaling factor?I did run an analysis on one leaf and made a plot. What are the units for the plot?
<Capture.PNG>
On Tuesday, September 17, 2019 at 3:14:37 PM UTC-7, James Kerns wrote:Lot going on with your algorithm so it's hard to comment. I plotted a PF delivery (the standard Varian plan) for a leaf, plot attached. If you do a quick and dirty calc of rise/run to get travel speed between pickets it's around 2cm/s. You could plot the leaf actual just as I did for a single leaf to get an idea of what to expect here as a sanity check for your algorithm.log.axis_data.mlc.leaf_axes[40].plot_actual() # use whatever valid leaf numberGiven that the CSV (is this a dynalog or export from pylinac?) agrees with pylinac then I'd guess it's something to do with your algorithm for detecting start/stop motion.Denis also has a point if you're using raw dynalogs which needs correction for the scaling; pylinac will do this automatically (see here). Trajectory logs are defined in the iso plane normal to the beam by default.
On Tuesday, September 17, 2019 at 4:04:27 PM UTC-5, bryan wrote:I'm trying to incorporate a leaf speed test without adding an extra field. My thought is to use the picket fence test, that way you can do the picket analysis and at the same time grab the log file associated with the picket without any extra effort. The goal is to calculate an average leaf speed value from the picket fence without regard to direction of travel. I'm using pylinac function get_snapshot_values to return both banks of leaves and their actual position. This information goes into a DataFrame using pandas where a nested for loop iterates through to obtain each leaf and its associated snapshot value. Conditional statements are also set up to help determine when the leaves have stopped and when they have started moving. The idea is to take the difference in the starting position and ending position to yield the distance traveled, count how many snapshots it took to get from starting to ending and multiply by how often the snapshots are taken (20ms for trajectory and 50ms for dyanlog) to yield time and convert to seconds, then divide distance by time and average since this is a picket fence. What I'm finding is that the leaf speed exceeds the 2.5cm/s. All positions and time were verified by looking at the csv file created for the picket and comparing those numbers with the programs numbers. Is there something I am missing or not taking into account? Any suggestions would be helpful.
--
You received this message because you are subscribed to the Google Groups "Pylinac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylinac+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylinac/b5a977f1-6192-4e78-88b7-5dbb1d77c5c2%40googlegroups.com.
<Capture.PNG>
log=pylinac.load_log(..., excude_beam_off=False)