--- tags: minutes, motion --- # Motion Meeting Minutes | BaPSF | February 22, 2022 ```bash src +-- daq_mod_probedrives/ # contians python code +-- LabView/ #contains LabView code setup.py setup.cfg ``` ```bash daq_mod_probedrives/ # contians python code LabView/ #contains LabView code setup.py setup.cfg ``` ```python class CamelCase: ... def function_use_lower_and_underscores(): ... ``` ## Structure to Configure Motion for a Data Run ```bash Motion Configuration +-- Drive Group Config | +-- Probe Drive Config | +-- Probe Config | +-- MotionList Config ``` * Motion Configuration * the overall motion configurat for the data run * this is what it send back to the DAQ * Composed X number of Drive Groups * Drive Group Config * the unit that defines everything need to move a prodrive * has include configurations for * Probe Drive * Probe * MotionList * has addtion configuration parameters like port number, port location, etc. * Probe Drive Config * defines all the parameters of a probe drive * does not include infor specific to a probe or motionlist * includes infor like number of axes, IP addresses for axis motors, orientation of axes, type of threaded rod, etc. * Probe Config * defines all the physical characteristics of a probe * does not include info about a probe drive or motionlist * this would include thins like type of probe, length of probe shaft, dia. of probe shaft, wall thickness of probe shaft, etc. * MotionList Config * defines a motionlist * does not include info about a probe or probe drive * contains info like boundary of the points, grid parameters, etc. ## What Metadata is needed for each of these configuraitons? (not exhaustive outline) * MotionList Config * see https://github.com/BaPSF/daq-mod-probedrives/issues/1 * name -- name of motion list * units -- physical units of the parameter values (SI, mks, cgs, ips, etc. ) * shape -- type of bounding shape, rectangle, circle, sphere, etc. * dimentionality -- 1D, 2D, 3D, 1D+Rotation, 2D+Rotation, etc. * parameters that fully define shape (these are unique to shape) * polygon list of vertice indices * rectangle side lengths and bounding center coordinates * grid style -- rectangular, cylindrical, spherical * these 3 option should recognize shape and behave accordingly * paremeters that fully define grid (these are unique to the grid style) * center or starting coordinates * deltas for each corrdinate * exclution boundaries * **!! needs more thought !!** * Probe Config * name * date fabricated * last date serviced * units -- physcial units of parameter vales (SI, cgs, IPS, etc.) * probe type -- langmuir, bdot, etc. * probe shaft dia. * probe shaft thickness * coating thickness * shaft material * coating material * length of shaft * length of probe tip * ... * Probe Drive Config * name * number of axes * dimensionality * coordinats of axes * IP addresses of axis motors * axis threaded rod type * axis steps/revolution * axis motor counts/step (motor encoder conversion) * axis home postion in counts (??) * Probe Group Config * MotionList config * Probe config * Probe Drive config * port number * port location * probe pivot point (probable in LaPD coordinates) * probe drive feedthru location (delta from pivot point ??) * distance from the pivot point to feedthru opening (air or vacuum side?) ... maybe an array to list both points * probe drive clamp location (delta from feedthru location ??) * distance from air side feedthru to clamp onto probe (front side or back side clamp point ??) ... maybe array to list both points ## How to design these elements in Python? * Initial thought would have each configuration have there own `UserDict` class * Each class should be able to read/write a `toml` file ```python from collections import UserDict class MotionListConfig(UserDict): ... class ProbeConfig(UserDict): ... class ProbeDriveConfig(UserDict): ... class ProbeGroupConfig(UserDict): ... def point_generator(config: ProbeGroupConfig, pt_type="motor"): # would take a configuration and generate all the motion points # pt_type="motor" -- points are generated as motor steps # would be used for internal runtime # pt_tupe="lapd" -- points are generated as LaPD coords # would be used externally by a human user ... ``` ## Shape classes ```python from abc import ABC, abstractmethod class AbstractBoundingShape(ABC): @abstractmethod def is_pt_in_shape(self, point): ... class PolygonShape(AbrstactBoundingShape): ... ```