diff --git a/docs/nodes/AI_ML/IMAGE_CLASSIFICATION/HUGGING_FACE_PIPELINE/a1-[autogen]/docstring.txt b/docs/nodes/AI_ML/IMAGE_CLASSIFICATION/HUGGING_FACE_PIPELINE/a1-[autogen]/docstring.txt index 6775992d4..395f8a84c 100644 --- a/docs/nodes/AI_ML/IMAGE_CLASSIFICATION/HUGGING_FACE_PIPELINE/a1-[autogen]/docstring.txt +++ b/docs/nodes/AI_ML/IMAGE_CLASSIFICATION/HUGGING_FACE_PIPELINE/a1-[autogen]/docstring.txt @@ -1,20 +1,29 @@ -Hugging Face Pipeline for Image Classification. +The HUGGING_FACE_PIPELINE node uses a classification pipeline to process and classify an image. + + For more information about Vision Transformers, + see: https://huggingface.co/google/vit-base-patch16-224 + + For a complete list of models, see: + https://huggingface.co/models?pipeline_tag=image-classification + + For examples of how revision parameters (such as 'main') is used, + see: https://huggingface.co/google/vit-base-patch16-224/commits/main Parameters ---------- - default: Image - The input image to be classified. The image must be a PIL.Image object wrapped in a flojoy Image object. - model: str + default : Image + The input image to be classified. + The image must be a PIL.Image object, wrapped in a Flojoy Image object. + model : str The model to be used for classification. - If not specified, Vision Transformers (i.e. `google/vit-base-patch16-224`) are used. - For more information about Vision Transformers, see: https://huggingface.co/google/vit-base-patch16-224 - For a complete list of models see: https://huggingface.co/models?pipeline_tag=image-classification - revision: str + If not specified, Vision Transformers (i.e. 'google/vit-base-patch16-224') are used. + revision : str The revision of the model to be used for classification. - If not specified, main is `used`. For instance see: https://huggingface.co/google/vit-base-patch16-224/commits/main + If not specified, 'main' is used. Returns ------- DataFrame: - A DataFrame containing as columns the `label` classification label and `score`, its confidence score. - All scores are between 0 and 1 and sum to 1. + A DataFrame containing the columns 'label' (as classification label) + and 'score' (as the confidence score). + All scores are between 0 and 1, and sum to 1. diff --git a/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/ONNX_MODEL.md b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/ONNX_MODEL.md new file mode 100644 index 000000000..4ded5d315 --- /dev/null +++ b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/ONNX_MODEL.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/a1-[autogen]/docstring.txt b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..902772f8a --- /dev/null +++ b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/a1-[autogen]/docstring.txt @@ -0,0 +1,41 @@ +ONNX_MODEL loads a serialized ONNX model and uses it to make predictions using ONNX Runtime. + + This allows supporting a wide range of deep learning frameworks and hardware platforms. + + Notes + ----- + + On the one hand, ONNX is an open format to represent deep learning models. + ONNX defines a common set of operators - the building blocks of machine learning + and deep learning models - and a common file format to enable AI developers + to use models with a variety of frameworks, tools, runtimes, and compilers. + + See: https://onnx.ai/ + + On the other hand, ONNX Runtime is a high-performance inference engine for machine + learning models in the ONNX format. ONNX Runtime has proved to considerably increase + performance in inferencing for a broad range of ML models and hardware platforms. + + See: https://onnxruntime.ai/docs/ + + Moreover, the ONNX Model Zoo is a collection of pre-trained models for common + machine learning tasks. The models are stored in ONNX format and are ready to use + in different inference scenarios. + + See: https://github.com/onnx/models + + Parameters + ---------- + file_path : str + Path to a ONNX model to load and use for prediction. + + default : Vector + The input tensor to use for prediction. + For now, only a single input tensor is supported. + Note that the input tensor shape is not checked against the model's input shape. + + Returns + ------- + Vector: + The predictions made by the ONNX model. + For now, only a single output tensor is supported. diff --git a/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/a1-[autogen]/python_code.txt b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..012554b48 --- /dev/null +++ b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/a1-[autogen]/python_code.txt @@ -0,0 +1,62 @@ +from flojoy import flojoy, run_in_venv, Vector +from flojoy.utils import FLOJOY_CACHE_DIR + + +@flojoy +@run_in_venv( + pip_dependencies=[ + "onnxruntime", + "numpy", + "onnx", + ] +) +def ONNX_MODEL( + file_path: str, + default: Vector, +) -> Vector: + + + import os + import onnx + import urllib.request + import numpy as np + import onnxruntime as rt + + model_name = os.path.basename(file_path) + + if file_path.startswith("http://") or file_path.startswith("https://"): + # Downloading the ONNX model from a URL to FLOJOY_CACHE_DIR. + onnx_model_zoo_cache = os.path.join( + FLOJOY_CACHE_DIR, "cache", "onnx", "model_zoo" + ) + + os.makedirs(onnx_model_zoo_cache, exist_ok=True) + + filename = os.path.join(onnx_model_zoo_cache, model_name) + + urllib.request.urlretrieve( + url=file_path, + filename=filename, + ) + + # Using the downloaded file. + file_path = filename + + # Pre-loading the serialized model to validate whether is well-formed or not. + model = onnx.load(file_path) + onnx.checker.check_model(model) + + # Using ONNX runtime for the ONNX model to make predictions. + sess = rt.InferenceSession(file_path, providers=["CPUExecutionProvider"]) + + # TODO(jjerphan): Assuming a single input and a single output for now. + input_name = sess.get_inputs()[0].name + label_name = sess.get_outputs()[0].name + + # TODO(jjerphan): For now NumPy is assumed to be the main backend for Flojoy. + # We might adapt it in the future so that we can use other backends + # for tensor libraries for application using Deep Learning libraries. + input_tensor = np.asarray(default.v, dtype=np.float32) + predictions = sess.run([label_name], {input_name: input_tensor})[0] + + return Vector(v=predictions) diff --git a/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/hardware.md b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/media.md b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/notes.md b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/AI_ML/LOAD_MODEL/ONNX_MODEL/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/AI_ML/NLP/COUNT_VECTORIZER/a1-[autogen]/docstring.txt b/docs/nodes/AI_ML/NLP/COUNT_VECTORIZER/a1-[autogen]/docstring.txt index f44858ce9..16ec78a2b 100644 --- a/docs/nodes/AI_ML/NLP/COUNT_VECTORIZER/a1-[autogen]/docstring.txt +++ b/docs/nodes/AI_ML/NLP/COUNT_VECTORIZER/a1-[autogen]/docstring.txt @@ -1,10 +1,8 @@ +The COUNT_VECTORIZER node receives a collection (matrix, vector or dataframe) of text documents and converts it to a matrix of token counts. -The COUNT_VECTORIZER node receives a collection (matrix, vector or dataframe) of -text documents to a matrix of token counts. - -Returns -------- -tokens: DataFrame - holds all the unique tokens observed from the input. -word_count_vector: Vector - contains the occurences of these tokens from each sentence. + Returns + ------- + tokens: DataFrame + Holds all the unique tokens observed from the input. + word_count_vector: Vector + Contains the occurences of these tokens from each sentence. diff --git a/docs/nodes/AI_ML/PREDICT_TIME_SERIES/PROPHET_PREDICT/a1-[autogen]/docstring.txt b/docs/nodes/AI_ML/PREDICT_TIME_SERIES/PROPHET_PREDICT/a1-[autogen]/docstring.txt index d53b6eef5..cc5b56f6d 100644 --- a/docs/nodes/AI_ML/PREDICT_TIME_SERIES/PROPHET_PREDICT/a1-[autogen]/docstring.txt +++ b/docs/nodes/AI_ML/PREDICT_TIME_SERIES/PROPHET_PREDICT/a1-[autogen]/docstring.txt @@ -1,44 +1,44 @@ +The PROPHET_PREDICT node runs a Prophet model on the incoming dataframe. -The PROPHET_PREDICT node rains a Prophet model on the incoming dataframe. + The DataContainer input type must be a dataframe, and the first column (or index) of the dataframe must be of a datetime type. -The DataContainer input type must be a dataframe, and the first column (or index) of dataframe must be of a datetime type. + This node always returns a DataContainer of a dataframe type. It will also always return an 'extra' field with a key 'prophet' of which the value is the JSONified Prophet model. + This model can be loaded as follows: -This node always returns a DataContainer of a dataframe type. It will also always return an "extra" field with a key "prophet" of which the value is the JSONified Prophet model. -This model can be loaded as follows: - ```python - from prophet.serialize import model_from_json + ```python + from prophet.serialize import model_from_json - model = model_from_json(dc_inputs.extra["prophet"]) - ``` + model = model_from_json(dc_inputs.extra["prophet"]) + ``` -Parameters ----------- -run_forecast : bool - If True (default case), the dataframe of the returning DataContainer - ("m" parameter of the DataContainer) will be the forecasted dataframe. - It will also have an "extra" field with the key "original", which is - the original dataframe passed in. + Parameters + ---------- + run_forecast : bool + If True (default case), the dataframe of the returning DataContainer + ('m' parameter of the DataContainer) will be the forecasted dataframe. + It will also have an 'extra' field with the key 'original', which is + the original dataframe passed in. - If False, the returning dataframe will be the original data. + If False, the returning dataframe will be the original data. - This node will also always have an "extra" field, run_forecast, which - matches that of the parameters passed in. This is for future nodes - to know if a forecast has already been run. + This node will also always have an 'extra' field, run_forecast, which + matches that of the parameters passed in. This is for future nodes + to know if a forecast has already been run. - Default = True + Default = True -periods : int - The number of periods to predict out. Only used if run_forecast is True. - Default = 365 + periods : int + The number of periods to predict out. Only used if run_forecast is True. + Default = 365 -Returns -------- -DataFrame - With parameter as df. - Indicates either the original df passed in, or the forecasted df - (depending on if run_forecast is True). + Returns + ------- + DataFrame + With parameter as df. + Indicates either the original df passed in, or the forecasted df + (depending on if run_forecast is True). -DataContainer - With parameter as "extra". - Contains keys run_forecast which correspond to the input parameter, - and potentially "original" in the event that run_forecast is True. + DataContainer + With parameter as 'extra'. + Contains keys run_forecast which correspond to the input parameter, + and potentially 'original' in the event that run_forecast is True. diff --git a/docs/nodes/AI_ML/REGRESSION/LEAST_SQUARES/a1-[autogen]/docstring.txt b/docs/nodes/AI_ML/REGRESSION/LEAST_SQUARES/a1-[autogen]/docstring.txt index 3e7c6bfed..89914eb83 100644 --- a/docs/nodes/AI_ML/REGRESSION/LEAST_SQUARES/a1-[autogen]/docstring.txt +++ b/docs/nodes/AI_ML/REGRESSION/LEAST_SQUARES/a1-[autogen]/docstring.txt @@ -1,10 +1,9 @@ +The LEAST_SQUARE node computes the coefficients that minimize the distance between the inputs 'Matrix' or 'OrderedPair' class and the regression. -The LEAST_SQUARE node computes the coefficients that minimizes the distance between the inputs 'Matrix' or 'OrderedPair' class and the regression. - -Returns -------- -OrderedPair - x: input matrix (data points) - y: fitted line computed with returned regression weights -Matrix - m : fitted matrix computed with returned regression weights + Returns + ------- + OrderedPair + x: input matrix (data points) + y: fitted line computed with returned regression weights + Matrix + m: fitted matrix computed with returned regression weights diff --git a/docs/nodes/AI_ML/SEGMENTATION/DEEPLAB_V3/a1-[autogen]/docstring.txt b/docs/nodes/AI_ML/SEGMENTATION/DEEPLAB_V3/a1-[autogen]/docstring.txt index 4f5e32308..cfeed0f5c 100644 --- a/docs/nodes/AI_ML/SEGMENTATION/DEEPLAB_V3/a1-[autogen]/docstring.txt +++ b/docs/nodes/AI_ML/SEGMENTATION/DEEPLAB_V3/a1-[autogen]/docstring.txt @@ -1,10 +1,9 @@ - The DEEPLAB_V3 node returns a segmentation mask from an input image in a dataframe. -The input image is expected to be a DataContainer of an "image" type. + The input image is expected to be a DataContainer of an 'image' type. -The output is a DataContainer of an "image" type with the same dimensions as the input image, but with the red, green, and blue channels replaced with the segmentation mask. + The output is a DataContainer of an 'image' type with the same dimensions as the input image, but with the red, green, and blue channels replaced with the segmentation mask. -Returns -------- -Image + Returns + ------- + Image diff --git a/docs/nodes/EXTRACTORS/FILE/READ_S3/a1-[autogen]/docstring.txt b/docs/nodes/EXTRACTORS/FILE/READ_S3/a1-[autogen]/docstring.txt index 6e569c5c9..00ab9cac4 100644 --- a/docs/nodes/EXTRACTORS/FILE/READ_S3/a1-[autogen]/docstring.txt +++ b/docs/nodes/EXTRACTORS/FILE/READ_S3/a1-[autogen]/docstring.txt @@ -7,9 +7,9 @@ The READ_S3 node takes a S3_key name, S3 bucket name, and file name as input, an Parameters ---------- s3_name : str - name of the key that the user used to save access and secret access key + name of the key that the user used to save the access and secret access keys bucket_name : str - AWS S3 bucket name that they are trying to access + Amazon S3 bucket name that they are trying to access file_name : str name of the file that they want to extract diff --git a/docs/nodes/GENERATORS/SAMPLE_DATASETS/R_DATASET/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SAMPLE_DATASETS/R_DATASET/a1-[autogen]/docstring.txt index 48d2243d3..deed9387e 100644 --- a/docs/nodes/GENERATORS/SAMPLE_DATASETS/R_DATASET/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SAMPLE_DATASETS/R_DATASET/a1-[autogen]/docstring.txt @@ -1,11 +1,10 @@ +The R_DATASET node retrieves a pandas DataFrame from 'rdatasets', using the provided dataset_key parameter, and returns it wrapped in a DataContainer. -The R_DATASET node retrieves a pandas DataFrame from rdatasets using the provided dataset_key parameter and returns it wrapped in a DataContainer. + Parameters + ---------- + dataset_key : str -Parameters ----------- -dataset_key : str - -Returns -------- -DataFrame - A DataContainer object containing the retrieved pandas DataFrame. + Returns + ------- + DataFrame + A DataContainer object containing the retrieved pandas DataFrame. diff --git a/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/docstring.txt index 0301de899..82c6b61d1 100644 --- a/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SAMPLE_DATASETS/TEXT_DATASET/a1-[autogen]/docstring.txt @@ -1,37 +1,41 @@ The TEXT_DATASET node loads the 20 newsgroups dataset from scikit-learn. -The data is returned as a dataframe with one column containing the text -and the other containing the category. -Parameters ----------- -subset: "train" | "test" | "all", default="train" - Select the dataset to load: "train" for the training set, "test" for the test set, "all" for both. -categories: list of str, optional - Select the categories to load. By default, all categories are loaded. - The list of all categories is: - 'alt.atheism', - 'comp.graphics', - 'comp.os.ms-windows.misc', - 'comp.sys.ibm.pc.hardware', - 'comp.sys.mac.hardware', - 'comp.windows.x', - 'misc.forsale', - 'rec.autos', - 'rec.motorcycles', - 'rec.sport.baseball', - 'rec.sport.hockey', - 'sci.crypt', - 'sci.electronics', - 'sci.med', - 'sci.space', - 'soc.religion.christian', - 'talk.politics.guns', - 'talk.politics.mideast', - 'talk.politics.misc', - 'talk.religion.misc' -remove_headers: boolean, default=false - Remove the headers from the data. -remove_footers: boolean, default=false - Remove the footers from the data. -remove_quotes: boolean, default=false - Remove the quotes from the data. + The data is returned as a dataframe with one column containing the text and the other containing the category. + + Parameters + ---------- + subset : "train" | "test" | "all", default="train" + Select the dataset to load: "train" for the training set, "test" for the test set, "all" for both. + categories : list of str, optional + Select the categories to load. By default, all categories are loaded. + The list of all categories is: + 'alt.atheism', + 'comp.graphics', + 'comp.os.ms-windows.misc', + 'comp.sys.ibm.pc.hardware', + 'comp.sys.mac.hardware', + 'comp.windows.x', + 'misc.forsale', + 'rec.autos', + 'rec.motorcycles', + 'rec.sport.baseball', + 'rec.sport.hockey', + 'sci.crypt', + 'sci.electronics', + 'sci.med', + 'sci.space', + 'soc.religion.christian', + 'talk.politics.guns', + 'talk.politics.mideast', + 'talk.politics.misc', + 'talk.religion.misc' + remove_headers : boolean, default=false + Remove the headers from the data. + remove_footers : boolean, default=false + Remove the footers from the data. + remove_quotes : boolean, default=false + Remove the quotes from the data. + + Returns + ------- + DataFrame diff --git a/docs/nodes/GENERATORS/SAMPLE_IMAGES/SKIMAGE/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SAMPLE_IMAGES/SKIMAGE/a1-[autogen]/docstring.txt index 9bb381540..a3b43408e 100644 --- a/docs/nodes/GENERATORS/SAMPLE_IMAGES/SKIMAGE/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SAMPLE_IMAGES/SKIMAGE/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The SKIMAGE node is designed to load example images from scikit-image. +The SKIMAGE node is designed to load example images from 'scikit-image'. Examples can be found here: https://scikit-image.org/docs/stable/auto_examples/index.html diff --git a/docs/nodes/GENERATORS/SIMULATIONS/BASIC_OSCILLATOR/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/BASIC_OSCILLATOR/a1-[autogen]/docstring.txt index bc0619426..dbbab7a95 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/BASIC_OSCILLATOR/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/BASIC_OSCILLATOR/a1-[autogen]/docstring.txt @@ -1,27 +1,26 @@ - The BASIC_OSCILLATOR node is a combination of the LINSPACE and SINE nodes. -It offers a more straightforward way to generate signals, with sample rate and the time in seconds as parameters, along with all the parameters in the SINE node. + It offers a more straightforward way to generate signals, with sample rate and the time in seconds as parameters, along with all the parameters in the SINE node. -Parameters ----------- -sample_rate : float - How many samples are taken in a second. -time : float - The total amount of time of the signal. -waveform : select - The waveform type of the wave. -amplitude : float - The amplitude of the wave. -frequency : float - The wave frequency in radians/2pi. -offset : float - The y axis offset of the function. -phase : float - The x axis offset of the function. + Parameters + ---------- + sample_rate : float + The number of samples that are taken in a second. + time : float + The total amount of time of the signal. + waveform : select + The waveform type of the wave. + amplitude : float + The amplitude of the wave. + frequency : float + The wave frequency in radians/2pi. + offset : float + The y axis offset of the function. + phase : float + The x axis offset of the function. -Returns -------- -OrderedPair - x: time domain - y: generated signal + Returns + ------- + OrderedPair + x: time domain + y: generated signal diff --git a/docs/nodes/GENERATORS/SIMULATIONS/CONSTANT/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/CONSTANT/a1-[autogen]/docstring.txt index a141bbfba..ccbced4f2 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/CONSTANT/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/CONSTANT/a1-[autogen]/docstring.txt @@ -1,29 +1,26 @@ - The CONSTANT node generates a single x-y vector of numeric (floating point) constants. -Inputs ------- -default : OrderedPair|Vector - Optional input that defines the size of the output. - -Parameters ----------- -dc_type : select - The type of DataContainer to return. -constant : float - The value of the y axis output. -step : int - The size of the y and x axes. + Inputs + ------ + default : OrderedPair|Vector + Optional input that defines the size of the output. -Returns -------- -OrderedPair + Parameters + ---------- + dc_type : select + The type of DataContainer to return. + constant : float + The value of the y axis output. + step : int + The size of the y and x axes. -OrderedPair|Vector|Scalar - OrderedPair if selected - x: the x axis generated with size 'step' - y: the resulting constant with size 'step' - Vector if selected - v: the resulting constant with size 'step' - Scalar if selected - c: the resulting constant + Returns + ------- + OrderedPair|Vector|Scalar + OrderedPair if selected + x: the x axis generated with size 'step' + y: the resulting constant with size 'step' + Vector if selected + v: the resulting constant with size 'step' + Scalar if selected + c: the resulting constant diff --git a/docs/nodes/GENERATORS/SIMULATIONS/LINSPACE/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/LINSPACE/a1-[autogen]/docstring.txt index 9e42f9ac1..a85d945fe 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/LINSPACE/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/LINSPACE/a1-[autogen]/docstring.txt @@ -1,23 +1,22 @@ - The LINSPACE node generates data spaced evenly between two points. -It uses the numpy function linspace. It is useful for generating an x axis for the ordered pair data type. + It uses the 'linspace' numpy function. It is useful for generating an x-axis for the OrderedPair data type. -Inputs ------- -default : OrderedPair - Optional input in case LINSPACE is used in a loop. Not used. + Inputs + ------ + default : OrderedPair + Optional input in case LINSPACE is used in a loop. Not used. -Parameters ----------- -start : float - The start point of the data. -end : float - The end point of the data. -step : float - The number of points in the vector. + Parameters + ---------- + start : float + The start point of the data. + end : float + The end point of the data. + step : float + The number of points in the vector. -Returns -------- -Vector - v: the vector between start and end with step number of points. + Returns + ------- + Vector + v: the vector between 'start' and 'end' with a 'step' number of points. diff --git a/docs/nodes/GENERATORS/SIMULATIONS/MATRIX/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/MATRIX/a1-[autogen]/docstring.txt index 0a14bedc5..8ca988e7a 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/MATRIX/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/MATRIX/a1-[autogen]/docstring.txt @@ -1,16 +1,15 @@ +The MATRIX node takes two arguments, 'row' and 'col', as input. -The MATRIX node takes two arguments, row and col, as input. + Based on these inputs, it generates a random matrix where the integers inside the matrix are between 0 and 19. -Based on these inputs, it generates a random matrix where the integers inside the matrix are between 0 and 19. + Parameters + ---------- + row : int + number of rows + column : int + number of columns -Parameters ----------- -row : int - number of rows -column : int - number of columns - -Returns -------- -matrix - randomly generated matrix + Returns + ------- + matrix + randomly generated matrix diff --git a/docs/nodes/GENERATORS/SIMULATIONS/SECOND_ORDER_SYSTEM/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/SECOND_ORDER_SYSTEM/a1-[autogen]/docstring.txt index 6ec33d558..2b30a5433 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/SECOND_ORDER_SYSTEM/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/SECOND_ORDER_SYSTEM/a1-[autogen]/docstring.txt @@ -1,9 +1,11 @@ -The SECOND_ORDER_SYSTEM has a second order exponential function. This node is designed to be used in a loop. The data is appended as the loop progress and written to memory. +The SECOND_ORDER_SYSTEM has a second order exponential function. + + This node is designed to be used in a loop. The data is appended as the loop progresses and written to memory. Inputs ------ default : Scalar - PID node output + PID node output. Parameters ---------- @@ -11,7 +13,6 @@ The SECOND_ORDER_SYSTEM has a second order exponential function. This node is de The first time constant. d2 : float The second time constant. - Returns ------- Scalar diff --git a/docs/nodes/GENERATORS/SIMULATIONS/SINE/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/SINE/a1-[autogen]/docstring.txt index 5d04404a3..f66caa8ac 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/SINE/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/SINE/a1-[autogen]/docstring.txt @@ -1,27 +1,25 @@ +The SINE node generates a waveform function with the shape being defined by the input. -The SINE node generates a waveform function. With the shape being defined -by the input. + Inputs + ------ + default : OrderedPair|Vector + Input that defines the x-axis values of the function and output. -Inputs ------- -default : OrderedPair|Vector - Input that defines the x axis values of the function and output. + Parameters + ---------- + waveform : select + The waveform type of the wave. + amplitude : float + The amplitude of the wave. + frequency : float + The wave frequency in radians/2pi. + offset : float + The y axis offset of the function. + phase : float + The x axis offset of the function. -Parameters ----------- -waveform : select - The waveform type of the wave. -amplitude : float - The amplitude of the wave. -frequency : float - The wave frequency in radians/2pi. -offset : float - The y axis offset of the function. -phase : float - The x axis offset of the function. - -Returns -------- -OrderedPair - x: the input v or x values - y: the resulting sine function + Returns + ------- + OrderedPair + x: the input v or x values + y: the resulting sine function diff --git a/docs/nodes/GENERATORS/SIMULATIONS/TEXT/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/TEXT/a1-[autogen]/docstring.txt index df01bac62..1870eb33a 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/TEXT/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/TEXT/a1-[autogen]/docstring.txt @@ -2,10 +2,10 @@ The TEXT node returns a TextBlob DataContainer. Parameters ---------- - value: str - The value set in Parameters + value : str + The value set in Parameters. Returns ------- TextBlob - text_blob: return the value being set in Parameters + Return the value being set in Parameters. diff --git a/docs/nodes/GENERATORS/SIMULATIONS/TIMESERIES/a1-[autogen]/docstring.txt b/docs/nodes/GENERATORS/SIMULATIONS/TIMESERIES/a1-[autogen]/docstring.txt index 067936259..cbd576e54 100644 --- a/docs/nodes/GENERATORS/SIMULATIONS/TIMESERIES/a1-[autogen]/docstring.txt +++ b/docs/nodes/GENERATORS/SIMULATIONS/TIMESERIES/a1-[autogen]/docstring.txt @@ -1,15 +1,13 @@ - - The TIMESERIES node generates a random timeseries vector (as a DataFrame). -Parameters ----------- -start_date : str - The start date of the timeseries in the format YYYY:MM:DD. -end_date : str - The end date of the timeseries in the format YYYY:MM:DD. - -Returns -------- -DataFrame - m: the resulting timeseries + Parameters + ---------- + start_date : str + The start date of the timeseries in the format 'YYYY:MM:DD'. + end_date : str + The end date of the timeseries in the format 'YYYY:MM:DD'. + + Returns + ------- + DataFrame + m: the resulting timeseries diff --git a/docs/nodes/IO/ANALOG_SENSORS/PRESSURE_SENSORS/FLEXIFORCE_25LB/a1-[autogen]/docstring.txt b/docs/nodes/IO/ANALOG_SENSORS/PRESSURE_SENSORS/FLEXIFORCE_25LB/a1-[autogen]/docstring.txt index 69d69fe34..c00dd021a 100644 --- a/docs/nodes/IO/ANALOG_SENSORS/PRESSURE_SENSORS/FLEXIFORCE_25LB/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/ANALOG_SENSORS/PRESSURE_SENSORS/FLEXIFORCE_25LB/a1-[autogen]/docstring.txt @@ -1,6 +1,8 @@ - The Flexiforce node allows you to convert voltages measured with the Phidget Interface Kit into pressures. -Calibration1 : float - Calibration parameters to convert voltage into pressure. -calibration2 : float - Calibration parameters to convert voltage into pressure. + + Parameters + ---------- + Calibration1 : float + Calibration parameters to convert voltage into pressure. + calibration2 : float + Calibration parameters to convert voltage into pressure. diff --git a/docs/nodes/IO/ANALOG_SENSORS/THERMOCOUPLES/LM34/a1-[autogen]/docstring.txt b/docs/nodes/IO/ANALOG_SENSORS/THERMOCOUPLES/LM34/a1-[autogen]/docstring.txt index b2af7fe64..449826951 100644 --- a/docs/nodes/IO/ANALOG_SENSORS/THERMOCOUPLES/LM34/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/ANALOG_SENSORS/THERMOCOUPLES/LM34/a1-[autogen]/docstring.txt @@ -1,4 +1,6 @@ - The LM34 node allows you to convert voltages measured with a thermocouple (LM34) connected to a LabJack U3 device into temperatures. -Calibration1, Calibration2, Calibration3 : float - Calibration parameters to convert voltage into temperature in Celcius. + + Parameters + ---------- + Calibration1, Calibration2, Calibration3 : float + Calibration parameters to convert voltage into temperature in Celcius. diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/OPEN_WEBCAM.md b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/OPEN_WEBCAM.md new file mode 100644 index 000000000..5c49b7dfd --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/OPEN_WEBCAM.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/a1-[autogen]/docstring.txt b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..6f4374314 --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/a1-[autogen]/docstring.txt @@ -0,0 +1,12 @@ +The OPEN_WEBCAM node opens a connection with the selected camera. + + Parameters + ---------- + camera : Camera + The camera to use. + resolution : select + Camera resolution. Choose from a few options. + + Returns + ------- + None diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/a1-[autogen]/python_code.txt b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..fd4be8127 --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/a1-[autogen]/python_code.txt @@ -0,0 +1,20 @@ +import cv2 +from flojoy import CameraDevice, flojoy, DataContainer +from flojoy.connection_manager import DeviceConnectionManager +from typing import Optional, Literal + + +@flojoy(deps={"opencv-python-headless": "4.7.0.72"}) +def OPEN_WEBCAM( + camera: CameraDevice, + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + if not camera: + raise ValueError("No camera selected") + + cam = cv2.VideoCapture(camera.get_id()) + DeviceConnectionManager.register_connection(camera, cam) + + return None diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/hardware.md b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/media.md b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/notes.md b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/examples/EX1/app.json b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/examples/EX1/app.json new file mode 100644 index 000000000..5db094040 --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/examples/EX1/app.json @@ -0,0 +1,204 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 192, + "height": 192, + "id": "OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5", + "type": "IO", + "data": { + "id": "OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5", + "label": "OPEN WEBCAM", + "func": "OPEN_WEBCAM", + "type": "IO", + "ctrls": { + "camera": { + "type": "CameraDevice", + "default": null, + "desc": null, + "overload": null, + "functionName": "OPEN_WEBCAM", + "param": "camera", + "value": "" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": null + } + ], + "pip_dependencies": [ + { + "name": "opencv-python-headless", + "v": "4.7.0.72" + } + ], + "path": "IO/IMAGING/OPEN_WEBCAM/OPEN_WEBCAM.py", + "selected": false + }, + "position": { + "x": -179.01679378861343, + "y": 3.074962043597168 + }, + "selected": false, + "positionAbsolute": { + "x": -179.01679378861343, + "y": 3.074962043597168 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "type": "IO", + "data": { + "id": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "label": "WEBCAM", + "func": "WEBCAM", + "type": "IO", + "ctrls": { + "connection": { + "type": "CameraConnection", + "default": null, + "desc": null, + "overload": null, + "functionName": "WEBCAM", + "param": "connection", + "value": "" + }, + "resolution": { + "type": "select", + "options": [ + "default", + "640x360", + "640x480", + "1280x720", + "1920x1080" + ], + "default": "default", + "desc": "Camera resolution. Choose from a few options.", + "overload": null, + "functionName": "WEBCAM", + "param": "resolution", + "value": "default" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Image", + "desc": null + } + ], + "pip_dependencies": [ + { + "name": "opencv-python-headless", + "v": "4.7.0.72" + } + ], + "path": "IO/IMAGING/WEBCAM/WEBCAM.py", + "selected": false + }, + "position": { + "x": 179.0676354144525, + "y": 0.6447218141543658 + }, + "selected": false, + "positionAbsolute": { + "x": 179.0676354144525, + "y": 0.6447218141543658 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06", + "type": "VISUALIZERS", + "data": { + "id": "IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06", + "label": "IMAGE", + "func": "IMAGE", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Image|Grayscale", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing the Plotly Image visualization of the input image" + } + ], + "path": "VISUALIZERS/PLOTLY/IMAGE/IMAGE.py", + "selected": false + }, + "position": { + "x": 515.9438185125092, + "y": -20.240488117947223 + }, + "selected": false, + "positionAbsolute": { + "x": 515.9438185125092, + "y": -20.240488117947223 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "sourceHandle": "default", + "target": "IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06", + "targetHandle": "default", + "id": "reactflow__edge-WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12cdefault-IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06default" + }, + { + "source": "OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5", + "sourceHandle": "default", + "target": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "targetHandle": "default", + "id": "reactflow__edge-OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5default-WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12cdefault" + } + ], + "viewport": { + "x": 255.10425070720453, + "y": 317.88940714410813, + "zoom": 0.5 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/IMAGING/OPEN_WEBCAM/examples/EX1/example.md b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/examples/EX1/example.md new file mode 100644 index 000000000..8255654e7 --- /dev/null +++ b/docs/nodes/IO/IMAGING/OPEN_WEBCAM/examples/EX1/example.md @@ -0,0 +1,12 @@ +--- +title: OPEN_WEBCAM +description: In this example, the OPEN_WEBCAM opens the connection with the connected camera, then uses the `WEBCAM` node takes and returns a picture. The IMSHOW node then displays the image taken by the camera. +keyword: [Python, Instrument, Web cam, Camera, Python webcam integration, Camera instrument in Python, Capture images and videos, Streamline webcam usage, Python-based camera control, Webcam integration techniques, Python image and video capture, Enhance projects with webcam, Accurate media processing, Webcam usage with Python] +image: https://raw.githubusercontent.com/flojoy-ai/docs/main/docs/nodes/INSTRUMENTS/WEB_CAM/CAMERA/examples/EX1/output.jpeg +--- + +In this example app, the [`CAMERA`](https://github.com/flojoy-io/nodes/blob/main/INSTRUMENTS/WEB_CAM/CAMERA/CAMERA.py) node takes and returns a picture from a camera connected to the computer. + +The camera first has to be opened with the [`OPEN_CAMERA`](https://github.com/flojoy-io/nodes/blob/main/INSTRUMENTS/WEB_CAM/CAMERA/CAMERA.py) node, which requires you to select which camera to use. + +The [`IMSHOW`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/TABLE/TABLE.py) node displays the image taken by the camera that was selected. diff --git a/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/docstring.txt b/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/docstring.txt index f529c130a..8844ece47 100644 --- a/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/docstring.txt @@ -1,11 +1,11 @@ The CAMERA node acquires an image using the selected camera. - If no camera is detected, an error would be shown. + The selected camera must be opened already using the OPEN_WEBCAM node. Parameters ---------- - camera_ind : int - Camera index (i.e. camera identifier). + connection : Camera + The opened camera connection to use. resolution : select Camera resolution. Choose from a few options. diff --git a/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/python_code.txt b/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/python_code.txt index 857b54e82..1d2c71d19 100644 --- a/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/IMAGING/WEBCAM/a1-[autogen]/python_code.txt @@ -1,41 +1,38 @@ import cv2 -import os -from flojoy import flojoy, DataContainer +from flojoy import flojoy, DataContainer, CameraConnection, Image from typing import Optional, Literal -from PIL import Image -import numpy as np -@flojoy(deps={"opencv-python-headless": "4.7.0.72"}) +@flojoy(deps={"opencv-python-headless": "4.7.0.72"}, inject_connection=True) def WEBCAM( + connection: CameraConnection, default: Optional[DataContainer] = None, - camera_ind: int = -1, resolution: Literal[ "default", "640x360", "640x480", "1280x720", "1920x1080" ] = "default", -) -> DataContainer: +) -> Image: + cam = connection.get_handle() try: - camera = cv2.VideoCapture(camera_ind) if resolution != "default": resolution = resolution.split("x") try: - camera.set(cv2.CAP_PROP_FRAME_WIDTH, int(resolution[0])) - camera.set(cv2.CAP_PROP_FRAME_HEIGHT, int(resolution[1])) + cam.set(cv2.CAP_PROP_FRAME_WIDTH, int(resolution[0])) + cam.set(cv2.CAP_PROP_FRAME_HEIGHT, int(resolution[1])) except cv2.error as camera_error: print(f"Invalid resolution ({resolution}). Try a lower value.") raise camera_error - if not camera.isOpened(): + if not cam.isOpened(): raise cv2.error("Failed to open camera") - result, BGR_img = camera.read() + result, BGR_img = cam.read() if not result: raise cv2.error("Failed to capture image") - camera.release() - del camera + # cam.release() + # del cam RGB_img = cv2.cvtColor(BGR_img, cv2.COLOR_BGR2RGB) @@ -49,8 +46,7 @@ def WEBCAM( else: alpha_channel = None - camera_image = DataContainer( - type="Image", + camera_image = Image( r=red_channel, g=green_channel, b=blue_channel, diff --git a/docs/nodes/IO/IMAGING/WEBCAM/examples/EX1/app.json b/docs/nodes/IO/IMAGING/WEBCAM/examples/EX1/app.json index b0da68812..5db094040 100644 --- a/docs/nodes/IO/IMAGING/WEBCAM/examples/EX1/app.json +++ b/docs/nodes/IO/IMAGING/WEBCAM/examples/EX1/app.json @@ -2,26 +2,86 @@ "rfInstance": { "nodes": [ { - "width": 150, - "height": 150, - "id": "CAMERA-29dc2b2f-b87c-46a3-9ddc-11e685de3206", - "type": "INSTRUMENTS", + "width": 192, + "height": 192, + "id": "OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5", + "type": "IO", "data": { - "id": "CAMERA-29dc2b2f-b87c-46a3-9ddc-11e685de3206", - "label": "CAMERA", - "func": "CAMERA", - "type": "INSTRUMENTS", + "id": "OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5", + "label": "OPEN WEBCAM", + "func": "OPEN_WEBCAM", + "type": "IO", "ctrls": { - "camera_ind": { - "type": "int", - "default": -1, - "functionName": "CAMERA", - "param": "camera_ind", - "value": -1 + "camera": { + "type": "CameraDevice", + "default": null, + "desc": null, + "overload": null, + "functionName": "OPEN_WEBCAM", + "param": "camera", + "value": "" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": null + } + ], + "pip_dependencies": [ + { + "name": "opencv-python-headless", + "v": "4.7.0.72" + } + ], + "path": "IO/IMAGING/OPEN_WEBCAM/OPEN_WEBCAM.py", + "selected": false + }, + "position": { + "x": -179.01679378861343, + "y": 3.074962043597168 + }, + "selected": false, + "positionAbsolute": { + "x": -179.01679378861343, + "y": 3.074962043597168 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "type": "IO", + "data": { + "id": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "label": "WEBCAM", + "func": "WEBCAM", + "type": "IO", + "ctrls": { + "connection": { + "type": "CameraConnection", + "default": null, + "desc": null, + "overload": null, + "functionName": "WEBCAM", + "param": "connection", + "value": "" }, "resolution": { "type": "select", - "default": "default", "options": [ "default", "640x360", @@ -29,24 +89,30 @@ "1280x720", "1920x1080" ], - "functionName": "CAMERA", + "default": "default", + "desc": "Camera resolution. Choose from a few options.", + "overload": null, + "functionName": "WEBCAM", "param": "resolution", "value": "default" } }, + "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", "type": "Any", - "multiple": false + "multiple": false, + "desc": null } ], "outputs": [ { "name": "default", "id": "default", - "type": "Any" + "type": "Image", + "desc": null } ], "pip_dependencies": [ @@ -55,93 +121,84 @@ "v": "4.7.0.72" } ], - "path": "PYTHON/nodes/INSTRUMENTS/WEB_CAM/CAMERA/CAMERA.py", + "path": "IO/IMAGING/WEBCAM/WEBCAM.py", "selected": false }, "position": { - "x": 934.4795759482945, - "y": -38.568710835013746 + "x": 179.0676354144525, + "y": 0.6447218141543658 }, "selected": false, "positionAbsolute": { - "x": 934.4795759482945, - "y": -38.568710835013746 + "x": 179.0676354144525, + "y": 0.6447218141543658 }, "dragging": true }, { "width": 225, "height": 226, - "id": "IMAGE-cd503f68-87fd-478a-b577-baa959f3df08", + "id": "IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06", "type": "VISUALIZERS", "data": { - "id": "IMAGE-cd503f68-87fd-478a-b577-baa959f3df08", + "id": "IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06", "label": "IMAGE", "func": "IMAGE", "type": "VISUALIZERS", "ctrls": {}, + "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "Image", - "multiple": false + "type": "Image|Grayscale", + "multiple": false, + "desc": "the DataContainer to be visualized" } ], "outputs": [ { "name": "default", "id": "default", - "type": "Plotly" + "type": "Plotly", + "desc": "the DataContainer containing the Plotly Image visualization of the input image" } ], - "path": "PYTHON/nodes/VISUALIZERS/PLOTLY/IMAGE/IMAGE.py", + "path": "VISUALIZERS/PLOTLY/IMAGE/IMAGE.py", "selected": false }, "position": { - "x": 1261.9152508247892, - "y": -78.58047260527047 + "x": 515.9438185125092, + "y": -20.240488117947223 }, "selected": false, "positionAbsolute": { - "x": 1261.9152508247892, - "y": -78.58047260527047 + "x": 515.9438185125092, + "y": -20.240488117947223 }, "dragging": true } ], "edges": [ { - "source": "CAMERA-29dc2b2f-b87c-46a3-9ddc-11e685de3206", + "source": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", "sourceHandle": "default", - "target": "IMAGE-cd503f68-87fd-478a-b577-baa959f3df08", + "target": "IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06", "targetHandle": "default", - "id": "reactflow__edge-CAMERA-29dc2b2f-b87c-46a3-9ddc-11e685de3206default-IMAGE-cd503f68-87fd-478a-b577-baa959f3df08default" + "id": "reactflow__edge-WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12cdefault-IMAGE-d27c4496-301f-4882-8670-6bb84ebe7e06default" + }, + { + "source": "OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5", + "sourceHandle": "default", + "target": "WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12c", + "targetHandle": "default", + "id": "reactflow__edge-OPEN_WEBCAM-89c7016f-6198-4bee-bb37-0ffa21729da5default-WEBCAM-89b91b3a-0682-44db-95d9-b1e26d1dd12cdefault" } ], "viewport": { - "x": -358.59636577932724, - "y": 99.85117439980638, - "zoom": 1.0581352782820395 - } - }, - "ctrlsManifest": [ - { - "type": "input", - "name": "Slider", - "id": "INPUT_PLACEHOLDER", - "hidden": false, - "minHeight": 1, - "minWidth": 2, - "layout": { - "x": 0, - "y": 0, - "h": 2, - "w": 2, - "minH": 1, - "minW": 2, - "i": "INPUT_PLACEHOLDER" - } + "x": 255.10425070720453, + "y": 317.88940714410813, + "zoom": 0.5 } - ] + } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/DAQ_BOARDS/LABJACK/U3/BASIC/READ_A0_PINS/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/DAQ_BOARDS/LABJACK/U3/BASIC/READ_A0_PINS/a1-[autogen]/docstring.txt index 1d58d4d9e..882bcc731 100644 --- a/docs/nodes/IO/INSTRUMENTS/DAQ_BOARDS/LABJACK/U3/BASIC/READ_A0_PINS/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/DAQ_BOARDS/LABJACK/U3/BASIC/READ_A0_PINS/a1-[autogen]/docstring.txt @@ -1,7 +1,8 @@ -The READ_A0_PINS node allows you to record and return voltages from a sensor connected to a LABJACK U3 device. eturns temperature measurements with a - Use the sensor node to convert voltage into temperature measurements +The READ_A0_PINS node allows you to record and return voltages from a sensor connected to a LABJACK U3 device. + + The SENSOR node can be used to convert voltage into temperature measurements. Parameters ---------- number : int - Defines the number of temperature sensors connected to the LabJack U3 device. + Defines the number of temperature sensors connected to the LabJack U3 device. diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/BURST_MODE_33510B.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/BURST_MODE_33510B.md new file mode 100644 index 000000000..1d614a8d8 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/BURST_MODE_33510B.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..bd3d50175 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/a1-[autogen]/docstring.txt @@ -0,0 +1,42 @@ +The BURST_MODE_33510B node is used to turn the Burst mode on or off. + + You can set various settings for the triggering of the bursts as well. + The burst mode is way to have signals come in "bursts" that are triggered + externally or with a timer for instance. + + If the "VISA_address" parameter is not specified the VISA_index will be + used to find the address. The LIST_VISA node can be used to show the + indicies of all available VISA instruments. + + This node should also work with compatible Keysight 33XXX wavefunction + generators (although they are untested). + + Parameters + ---------- + VISA_address: str + The VISA address to query. + VISA_index: int + The address will be found from LIST_VISA node list with this index. + on_off: str + Turn the burst mode on or off. + channel: str + The channel to modify the burst mode for. + trigger_source: str + Set the trigger_source (e.g. externally or timed). + trigger_delay: float + Delay the burst by this number of seconds after a trigger. + trigger_slope: str + If triggering is external, trigger on a positive or negative slope. + burst_mode: str + Set the burst mode for the WFG. + burst_ncycles: int + How many cycles to have in one burst. + burst_phase: float + What phase to start the burst with, in degrees. + burst_polarity: str + The polarity of the burst in Gated mode, normal or inverted. + + Returns + ------- + DataContainer + TextBlob: summary of burst mode settings. diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..ef67d3cf6 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/a1-[autogen]/python_code.txt @@ -0,0 +1,87 @@ +from flojoy import flojoy, DataContainer, TextBlob +import pyvisa +from typing import Optional, Literal +from qcodes.instrument_drivers.Keysight import Keysight33512B +from usb.core import USBError + + +@flojoy( + deps={ + "pyvisa": "1.13.0", + "pyusb": "1.2.1", + "zeroconf": "0.102.0", + "pyvisa_py": "0.7.0", + "qcodes": "0.39.1", + } +) +def BURST_MODE_33510B( + VISA_address: Optional[str], + VISA_index: Optional[int] = 0, + on_off: Literal["ON", "OFF"] = "OFF", + channel: Literal["ch1", "ch2"] = "ch1", + trigger_source: Literal["EXT", "IMM", "TIM"] = "TIM", + trigger_delay: float = 0, + trigger_slope: Literal["POS", "NEG"] = "POS", + trigger_timer: float = 1e-3, + burst_mode: Literal["N Cycle", "Gated"] = "N Cycle", + burst_ncycles: int = 1, + burst_phase: float = 0, + burst_polarity: Literal["NORM", "INV"] = "NORM", + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + rm = pyvisa.ResourceManager("@py") + if VISA_address == "": + VISA_addresses = rm.list_resources() + VISA_address = VISA_addresses[int(VISA_index)] + + try: + ks = Keysight33512B( + "ks", + VISA_address, + visalib="@py", + device_clear=False, + ) + except USBError as err: + raise Exception( + "USB port error. Trying unplugging+replugging the port." + ) from err + + channel_str = channel + channel = getattr(ks, channel) + + channel.trigger_source(trigger_source) + assert trigger_delay >= 0, "trigger_delay must be greater than or equal to zero." + channel.trigger_delay(trigger_delay) + + if trigger_source == "EXT": + channel.trigger_slope(trigger_slope) + + if trigger_source == "TIM": + assert ( + trigger_timer >= 1e-6 + ), "trigger_timer must be greater than or equal to 1us." + channel.trigger_timer(trigger_timer) + + if on_off == "OFF": + channel.burst_state(on_off) + + assert ( + -360.0 <= burst_phase <= 360.0 + ), "The phase must be between -360 and 360 degrees." + channel.burst_mode(burst_mode) + channel.burst_phase(burst_phase) + + if burst_mode == "N Cycle": + assert burst_ncycles > 0, "burst_ncycles must be greater than 0." + channel.burst_ncycles(burst_ncycles) + + if burst_mode == "Gated": + channel.burst_polarity(burst_polarity) + + if on_off == "ON": + channel.burst_state(on_off) + ks.close() + + return TextBlob(text_blob=f"{channel_str} burst: {on_off}") diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/examples/EX1/app.json new file mode 100644 index 000000000..376e5d1db --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/examples/EX1/app.json @@ -0,0 +1,254 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 192, + "height": 192, + "id": "BURST_MODE_33510B-7ddc91f3-e2fa-47c8-baa4-9483b0372146", + "type": "IO", + "data": { + "id": "BURST_MODE_33510B-7ddc91f3-e2fa-47c8-baa4-9483b0372146", + "label": "BURST MODE 33510B", + "func": "BURST_MODE_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "VISA_address", + "value": "USB0::2391::9735::MY59003244::0::INSTR" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "VISA_index", + "value": 0 + }, + "on_off": { + "type": "select", + "options": [ + "ON", + "OFF" + ], + "default": "OFF", + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "on_off", + "value": "ON" + }, + "channel": { + "type": "select", + "options": [ + "ch1", + "ch2" + ], + "default": "ch1", + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "channel", + "value": "ch1" + }, + "trigger_source": { + "type": "select", + "options": [ + "EXT", + "IMM", + "TIM" + ], + "default": "TIM", + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "trigger_source", + "value": "TIM" + }, + "trigger_delay": { + "type": "float", + "default": 0, + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "trigger_delay", + "value": 0 + }, + "trigger_slope": { + "type": "select", + "options": [ + "POS", + "NEG" + ], + "default": "POS", + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "trigger_slope", + "value": "POS" + }, + "trigger_timer": { + "type": "float", + "default": 0.001, + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "trigger_timer", + "value": 0.000001 + }, + "burst_mode": { + "type": "select", + "options": [ + "N Cycle", + "Gated" + ], + "default": "N Cycle", + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "burst_mode", + "value": "N Cycle" + }, + "burst_ncycles": { + "type": "int", + "default": 1, + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "burst_ncycles", + "value": 10 + }, + "burst_phase": { + "type": "float", + "default": 0, + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "burst_phase", + "value": 0 + }, + "burst_polarity": { + "type": "select", + "options": [ + "NORM", + "INV" + ], + "default": "NORM", + "desc": null, + "overload": null, + "functionName": "BURST_MODE_33510B", + "param": "burst_polarity", + "value": "NORM" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "TextBlob: ON or OFF depending on on_off value." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/BURST_MODE_33510B/BURST_MODE_33510B.py", + "selected": false + }, + "position": { + "x": -240.28567405069748, + "y": -107.39744698085521 + }, + "selected": false, + "positionAbsolute": { + "x": -240.28567405069748, + "y": -107.39744698085521 + }, + "dragging": true + }, + { + "width": 384, + "height": 288, + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "type": "VISUALIZERS", + "data": { + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "label": "TEXT VIEW", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "TextBlob", + "multiple": false, + "desc": "the DataContainer to be visualized in text format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "selected": false + }, + "position": { + "x": 126.63251436934425, + "y": -126.35743104815421 + }, + "selected": false, + "positionAbsolute": { + "x": 126.63251436934425, + "y": -126.35743104815421 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "BURST_MODE_33510B-7ddc91f3-e2fa-47c8-baa4-9483b0372146", + "sourceHandle": "default", + "target": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "targetHandle": "default", + "id": "reactflow__edge-BURST_MODE_33510B-7ddc91f3-e2fa-47c8-baa4-9483b0372146default-TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0edefault" + } + ], + "viewport": { + "x": 1104.261946392206, + "y": 573.1338859553202, + "zoom": 1.2154437530123414 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/RETURN_ERRORS_33510B.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/RETURN_ERRORS_33510B.md new file mode 100644 index 000000000..e7bb4bbe3 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/RETURN_ERRORS_33510B.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..28b08580c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/a1-[autogen]/docstring.txt @@ -0,0 +1,23 @@ +The RETURN_ERRORS_33510B node returns error messages from the WFG. + + Error retrival is first-in-first-out (FIFO). Returning errors clears them + from the instruments queue. + + If the "VISA_address" parameter is not specified the VISA_index will be + used to find the address. The LIST_VISA node can be used to show the + indicies of all available VISA instruments. + + This node should also work with compatible Keysight 33XXX wavefunction + generators (although they are untested). + + Parameters + ---------- + VISA_address: str + The VISA address to query. + VISA_index: int + The address will be found from LIST_VISA node list with this index. + + Returns + ------- + DataContainer + TextBlob: Returns all errors in the WFG memory. diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..c1e5eb67f --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/a1-[autogen]/python_code.txt @@ -0,0 +1,44 @@ +from flojoy import flojoy, DataContainer, TextBlob +import pyvisa +from typing import Optional, Literal +from qcodes.instrument_drivers.Keysight import Keysight33512B +from usb.core import USBError + + +@flojoy( + deps={ + "pyvisa": "1.13.0", + "pyusb": "1.2.1", + "zeroconf": "0.102.0", + "pyvisa_py": "0.7.0", + "qcodes": "0.39.1", + } +) +def RETURN_ERRORS_33510B( + VISA_address: Optional[str], + VISA_index: Optional[int] = 0, + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + rm = pyvisa.ResourceManager("@py") + if VISA_address == "": + VISA_addresses = rm.list_resources() + VISA_address = VISA_addresses[int(VISA_index)] + + try: + ks = Keysight33512B( + "ks", + VISA_address, + visalib="@py", + device_clear=False, + ) + except USBError as err: + raise Exception( + "USB port error. Trying unplugging+replugging the port." + ) from err + + err_code, err_message = ks.error() + errors = f"{err_code} {err_message}" + + return TextBlob(text_blob=errors) diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/examples/EX1/app.json new file mode 100644 index 000000000..3006d1ec9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/examples/EX1/app.json @@ -0,0 +1,138 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 192, + "height": 192, + "id": "RETURN_ERRORS_33510B-3a066f98-2226-43cf-b6db-c231fd651f55", + "type": "IO", + "data": { + "id": "RETURN_ERRORS_33510B-3a066f98-2226-43cf-b6db-c231fd651f55", + "label": "RETURN ERRORS 33510B", + "func": "RETURN_ERRORS_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "RETURN_ERRORS_33510B", + "param": "VISA_address", + "value": "" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "RETURN_ERRORS_33510B", + "param": "VISA_index", + "value": 2 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "TextBlob: Returns all errors in the WFG memory." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/ADVANCED/RETURN_ERRORS_33510B/RETURN_ERRORS_33510B.py", + "selected": false + }, + "position": { + "x": 193.2467834815114, + "y": 112.8639037908917 + }, + "selected": false, + "positionAbsolute": { + "x": 193.2467834815114, + "y": 112.8639037908917 + } + }, + { + "width": 384, + "height": 288, + "id": "TEXT_VIEW-9ef30eb9-6f9c-4b38-bdcf-a4093e1ec2a0", + "type": "VISUALIZERS", + "data": { + "id": "TEXT_VIEW-9ef30eb9-6f9c-4b38-bdcf-a4093e1ec2a0", + "label": "TEXT VIEW", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "TextBlob", + "multiple": false, + "desc": "the DataContainer to be visualized in text format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "selected": false + }, + "position": { + "x": 591.3285686884251, + "y": 101.4852722421046 + }, + "selected": false, + "positionAbsolute": { + "x": 591.3285686884251, + "y": 101.4852722421046 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "RETURN_ERRORS_33510B-3a066f98-2226-43cf-b6db-c231fd651f55", + "sourceHandle": "default", + "target": "TEXT_VIEW-9ef30eb9-6f9c-4b38-bdcf-a4093e1ec2a0", + "targetHandle": "default", + "id": "reactflow__edge-RETURN_ERRORS_33510B-3a066f98-2226-43cf-b6db-c231fd651f55default-TEXT_VIEW-9ef30eb9-6f9c-4b38-bdcf-a4093e1ec2a0default" + } + ], + "viewport": { + "x": 1104.261946392206, + "y": 573.1338859553202, + "zoom": 1.2154437530123414 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/ON_OFF_33510B.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/ON_OFF_33510B.md new file mode 100644 index 000000000..8da553885 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/ON_OFF_33510B.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..2304a38ef --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/a1-[autogen]/docstring.txt @@ -0,0 +1,24 @@ +The ON_OFF_33510B node is used to turn the output on or off. + + If the "VISA_address" parameter is not specified the VISA_index will be + used to find the address. The LIST_VISA node can be used to show the + indicies of all available VISA instruments. + + This node should also work with compatible Keysight 33XXX wavefunction + generators (although they are untested). + + Parameters + ---------- + VISA_address: str + The VISA address to query. + VISA_index: int + The address will be found from LIST_VISA node list with this index. + on_off: str + Whether to turn the waveform generation to on or off. + channel: str + The channel to turn on or off. + + Returns + ------- + DataContainer + TextBlob: ON or OFF depending on on_off value. diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..3f2a38296 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/a1-[autogen]/python_code.txt @@ -0,0 +1,50 @@ +from flojoy import flojoy, DataContainer, TextBlob +import pyvisa +from typing import Optional, Literal +from qcodes.instrument_drivers.Keysight import Keysight33512B +from usb.core import USBError + + +@flojoy( + deps={ + "pyvisa": "1.13.0", + "pyusb": "1.2.1", + "zeroconf": "0.102.0", + "pyvisa_py": "0.7.0", + "qcodes": "0.39.1", + } +) +def ON_OFF_33510B( + VISA_address: Optional[str], + VISA_index: Optional[int] = 0, + on_off: Literal["ON", "OFF"] = "OFF", + channel: Literal["ch1", "ch2"] = "ch1", + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + rm = pyvisa.ResourceManager("@py") + if VISA_address == "": + VISA_addresses = rm.list_resources() + VISA_address = VISA_addresses[int(VISA_index)] + + try: + ks = Keysight33512B( + "ks", + VISA_address, + visalib="@py", + device_clear=False, + ) + except USBError as err: + raise Exception( + "USB port error. Trying unplugging+replugging the port." + ) from err + + channel_str = channel + channel = getattr(ks, channel) + + channel.output(on_off) + + ks.close() + + return TextBlob(text_blob=f"{channel_str}: {on_off}") diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/examples/EX1/app.json new file mode 100644 index 000000000..7b891eda7 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/examples/EX1/app.json @@ -0,0 +1,380 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 384, + "height": 288, + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "type": "VISUALIZERS", + "data": { + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "label": "TEXT VIEW", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "TextBlob", + "multiple": false, + "desc": "the DataContainer to be visualized in text format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "selected": false + }, + "position": { + "x": -104.31280346396179, + "y": -275.1195051479864 + }, + "selected": false, + "positionAbsolute": { + "x": -104.31280346396179, + "y": -275.1195051479864 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "type": "IO", + "data": { + "id": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "label": "CLOSE ALL", + "func": "CLOSE_ALL", + "type": "IO", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "optional: The input DataContainer is returned." + } + ], + "pip_dependencies": [ + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/QCODES/CLOSE_ALL/CLOSE_ALL.py", + "selected": false + }, + "position": { + "x": -919.3821328184661, + "y": -74.54262269929615 + }, + "selected": false, + "positionAbsolute": { + "x": -919.3821328184661, + "y": -74.54262269929615 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "ON_OFF_33510B-40f04122-9a47-4ecd-8181-7b42d087a126", + "type": "IO", + "data": { + "id": "ON_OFF_33510B-40f04122-9a47-4ecd-8181-7b42d087a126", + "label": "ON OFF 33510B", + "func": "ON_OFF_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "VISA_address", + "value": "USB0::2391::9735::MY59003244::0::INSTR" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "VISA_index", + "value": 0 + }, + "on_off": { + "type": "select", + "options": [ + "ON", + "OFF" + ], + "default": "OFF", + "desc": "Whether to turn the waveform generation to on or off.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "on_off", + "value": "ON" + }, + "channel": { + "type": "select", + "options": [ + "ch1", + "ch2" + ], + "default": "ch1", + "desc": "The channel to turn on or off.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "channel", + "value": "ch1" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "TextBlob: ON or OFF depending on on_off value." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/ON_OFF_33510B.py", + "selected": false + }, + "position": { + "x": -518.9542744208309, + "y": -225.7992199828376 + }, + "selected": false, + "positionAbsolute": { + "x": -518.9542744208309, + "y": -225.7992199828376 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "ON_OFF_33510B-c5638b61-e10d-48a1-b59d-835c2dfd2290", + "type": "IO", + "data": { + "id": "ON_OFF_33510B-c5638b61-e10d-48a1-b59d-835c2dfd2290", + "label": "ON OFF 33510B 1", + "func": "ON_OFF_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "VISA_address", + "value": "USB0::2391::9735::MY59003244::0::INSTR" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "VISA_index", + "value": 0 + }, + "on_off": { + "type": "select", + "options": [ + "ON", + "OFF" + ], + "default": "OFF", + "desc": "Whether to turn the waveform generation to on or off.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "on_off", + "value": "OFF" + }, + "channel": { + "type": "select", + "options": [ + "ch1", + "ch2" + ], + "default": "ch1", + "desc": "The channel to turn on or off.", + "overload": null, + "functionName": "ON_OFF_33510B", + "param": "channel", + "value": "ch2" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "TextBlob: ON or OFF depending on on_off value." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/ON_OFF_33510B/ON_OFF_33510B.py", + "selected": false + }, + "position": { + "x": -527.5335653145921, + "y": 123.28418767124424 + }, + "selected": false, + "positionAbsolute": { + "x": -527.5335653145921, + "y": 123.28418767124424 + }, + "dragging": true + }, + { + "width": 384, + "height": 288, + "id": "TEXT_VIEW-9b57ca0b-54cb-46c2-a71a-69bdc48fa993", + "type": "VISUALIZERS", + "data": { + "id": "TEXT_VIEW-9b57ca0b-54cb-46c2-a71a-69bdc48fa993", + "label": "TEXT VIEW 1", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "TextBlob", + "multiple": false, + "desc": "the DataContainer to be visualized in text format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "selected": false + }, + "position": { + "x": -120.86745747230276, + "y": 75.58695985795885 + }, + "selected": false, + "positionAbsolute": { + "x": -120.86745747230276, + "y": 75.58695985795885 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "sourceHandle": "default", + "target": "ON_OFF_33510B-40f04122-9a47-4ecd-8181-7b42d087a126", + "targetHandle": "default", + "id": "reactflow__edge-CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7default-ON_OFF_33510B-40f04122-9a47-4ecd-8181-7b42d087a126default" + }, + { + "source": "ON_OFF_33510B-40f04122-9a47-4ecd-8181-7b42d087a126", + "sourceHandle": "default", + "target": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "targetHandle": "default", + "id": "reactflow__edge-ON_OFF_33510B-40f04122-9a47-4ecd-8181-7b42d087a126default-TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0edefault" + }, + { + "source": "ON_OFF_33510B-c5638b61-e10d-48a1-b59d-835c2dfd2290", + "sourceHandle": "default", + "target": "TEXT_VIEW-9b57ca0b-54cb-46c2-a71a-69bdc48fa993", + "targetHandle": "default", + "id": "reactflow__edge-ON_OFF_33510B-c5638b61-e10d-48a1-b59d-835c2dfd2290default-TEXT_VIEW-9b57ca0b-54cb-46c2-a71a-69bdc48fa993default" + }, + { + "source": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "sourceHandle": "default", + "target": "ON_OFF_33510B-c5638b61-e10d-48a1-b59d-835c2dfd2290", + "targetHandle": "default", + "id": "reactflow__edge-CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7default-ON_OFF_33510B-c5638b61-e10d-48a1-b59d-835c2dfd2290default" + } + ], + "viewport": { + "x": 1104.261946392206, + "y": 573.1338859553202, + "zoom": 1.2154437530123414 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/OUTPUT_SYNC_33510B.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/OUTPUT_SYNC_33510B.md new file mode 100644 index 000000000..7f1c8e3f9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/OUTPUT_SYNC_33510B.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..33bc7e723 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/a1-[autogen]/docstring.txt @@ -0,0 +1,26 @@ +The OUTPUT_SYNC_33510B node is used sync multiple outputs phases. + + Can only be turned on for one channel. + + If the "VISA_address" parameter is not specified the VISA_index will be + used to find the address. The LIST_VISA node can be used to show the + indicies of all available VISA instruments. + + This node should also work with compatible Keysight 33XXX wavefunction + generators (although they are untested). + + Parameters + ---------- + VISA_address: str + The VISA address to query. + VISA_index: int + The address will be found from LIST_VISA node list with this index. + on_off: str + Whether to turn the waveform phase syncing on or off. + channel: str + The channel to use as the baseline phase. + + Returns + ------- + DataContainer + TextBlob: ON or OFF depending on on_off value. diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..24fc5fd12 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/a1-[autogen]/python_code.txt @@ -0,0 +1,53 @@ +from flojoy import flojoy, DataContainer, TextBlob +import pyvisa +from typing import Optional, Literal +from qcodes.instrument_drivers.Keysight import Keysight33512B +from usb.core import USBError + + +@flojoy( + deps={ + "pyvisa": "1.13.0", + "pyusb": "1.2.1", + "zeroconf": "0.102.0", + "pyvisa_py": "0.7.0", + "qcodes": "0.39.1", + } +) +def OUTPUT_SYNC_33510B( + VISA_address: Optional[str], + VISA_index: Optional[int] = 0, + on_off: Literal["ON", "OFF"] = "OFF", + channel: Literal["1", "2"] = "1", + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + rm = pyvisa.ResourceManager("@py") + if VISA_address == "": + VISA_addresses = rm.list_resources() + VISA_address = VISA_addresses[int(VISA_index)] + + try: + ks = Keysight33512B( + "ks", + VISA_address, + visalib="@py", + device_clear=False, + ) + except USBError as err: + raise Exception( + "USB port error. Trying unplugging+replugging the port." + ) from err + + ks.sync.source(int(channel)) + match on_off: + case "OFF": + ks.sync.output("OFF") + case "ON": + ks.sync.output("ON") + ks.write("PHAS:SYNC") + + ks.close() + + return TextBlob(text_blob=f"CH{channel} sync: {on_off}") diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/examples/EX1/app.json new file mode 100644 index 000000000..8bc9459b0 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/examples/EX1/app.json @@ -0,0 +1,221 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 384, + "height": 288, + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "type": "VISUALIZERS", + "data": { + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "label": "TEXT VIEW", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "TextBlob", + "multiple": false, + "desc": "the DataContainer to be visualized in text format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "selected": false + }, + "position": { + "x": -73.10397672973124, + "y": -120.11566570130807 + }, + "selected": false, + "positionAbsolute": { + "x": -73.10397672973124, + "y": -120.11566570130807 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "type": "IO", + "data": { + "id": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "label": "CLOSE ALL", + "func": "CLOSE_ALL", + "type": "IO", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "optional: The input DataContainer is returned." + } + ], + "pip_dependencies": [ + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/QCODES/CLOSE_ALL/CLOSE_ALL.py", + "selected": false + }, + "position": { + "x": -919.3821328184661, + "y": -74.54262269929615 + }, + "selected": false, + "positionAbsolute": { + "x": -919.3821328184661, + "y": -74.54262269929615 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "OUTPUT_SYNC_33510B-3ac2323e-d6a3-44e7-b7b2-f89168e0ad16", + "type": "IO", + "data": { + "id": "OUTPUT_SYNC_33510B-3ac2323e-d6a3-44e7-b7b2-f89168e0ad16", + "label": "OUTPUT SYNC 33510B", + "func": "OUTPUT_SYNC_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "OUTPUT_SYNC_33510B", + "param": "VISA_address", + "value": "USB0::2391::9735::MY59003244::0::INSTR" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "OUTPUT_SYNC_33510B", + "param": "VISA_index", + "value": 0 + }, + "on_off": { + "type": "select", + "options": [ + "ON", + "OFF" + ], + "default": "OFF", + "desc": "Whether to turn the waveform phase syncing on or off.", + "overload": null, + "functionName": "OUTPUT_SYNC_33510B", + "param": "on_off", + "value": "ON" + }, + "channel": { + "type": "select", + "options": [ + "1", + "2" + ], + "default": "1", + "desc": "The channel to use as the baseline phase.", + "overload": null, + "functionName": "OUTPUT_SYNC_33510B", + "param": "channel", + "value": "1" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "TextBlob: ON or OFF depending on on_off value." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/OUTPUT_SYNC_33510B/OUTPUT_SYNC_33510B.py", + "selected": false + }, + "position": { + "x": -510.11784179817596, + "y": -76.20285758215164 + }, + "selected": false, + "positionAbsolute": { + "x": -510.11784179817596, + "y": -76.20285758215164 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "sourceHandle": "default", + "target": "OUTPUT_SYNC_33510B-3ac2323e-d6a3-44e7-b7b2-f89168e0ad16", + "targetHandle": "default", + "id": "reactflow__edge-CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7default-OUTPUT_SYNC_33510B-3ac2323e-d6a3-44e7-b7b2-f89168e0ad16default" + }, + { + "source": "OUTPUT_SYNC_33510B-3ac2323e-d6a3-44e7-b7b2-f89168e0ad16", + "sourceHandle": "default", + "target": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "targetHandle": "default", + "id": "reactflow__edge-OUTPUT_SYNC_33510B-3ac2323e-d6a3-44e7-b7b2-f89168e0ad16default-TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0edefault" + } + ], + "viewport": { + "x": 1104.261946392206, + "y": 573.1338859553202, + "zoom": 1.2154437530123414 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/SET_WAVEFORM_33510B.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/SET_WAVEFORM_33510B.md new file mode 100644 index 000000000..c3eb9cb4d --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/SET_WAVEFORM_33510B.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..2f5e0fc14 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/a1-[autogen]/docstring.txt @@ -0,0 +1,44 @@ +The SET_WAVEFORM_33510B node is used to set waveform settings for a 33510B. + + The Keysight 33510B has a variety of waveform settings available. + + If the "VISA_address" parameter is not specified the VISA_index will be + used to find the address. The LIST_VISA node can be used to show the + indicies of all available VISA instruments. + + This node should also work with compatible Keysight 33XXX wavefunction + generators (although they are untested). + + Parameters + ---------- + VISA_address: str + The VISA address to query. + VISA_index: int + The address will be found from LIST_VISA node list with this index. + on_off: str + Whether to turn the waveform generation to on or off. + query_set: str + Whether to query or set the waveform. + channel: str + The channel to set or query. + waveform: str + The type of waveform to use. + frequency: float + The voltage of the waveform to set, in Hz. + amplitude: float + The voltage of the waveform to set. + amplitude_unit: str + The voltage unit to set the waveform to. + phase: float + The phase to set the waveform to, in degrees. + offset: float + The voltage offset to set the waveform to, in volts. + ramp_symmetry: float + The ramp symmetry if the RAMP waveform is used, in percent. + pulse_width: float + The pulse width in nanoseconds if the PULS waveform is used. + + Returns + ------- + DataContainer + Scalar: The waveform measurement in the selected statistic mode. diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..1b02ff10e --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/a1-[autogen]/python_code.txt @@ -0,0 +1,111 @@ +from flojoy import flojoy, DataContainer, TextBlob +import pyvisa +from typing import Optional, Literal +from qcodes.instrument_drivers.Keysight import Keysight33512B +from usb.core import USBError + + +@flojoy( + deps={ + "pyvisa": "1.13.0", + "pyusb": "1.2.1", + "zeroconf": "0.102.0", + "pyvisa_py": "0.7.0", + "qcodes": "0.39.1", + } +) +def SET_WAVEFORM_33510B( + VISA_address: Optional[str], + VISA_index: Optional[int] = 0, + on_off: Literal["ON", "OFF"] = "OFF", + query_set: Literal["query", "set"] = "query", + channel: Literal["ch1", "ch2"] = "ch1", + waveform: Literal[ + "SIN", "SQU", "TRI", "RAMP", "PULS", "PRBS", "NOIS", "ARB", "DC" + ] = "SIN", + frequency: float = 1e6, + amplitude: float = 0.1, + amplitude_unit: Literal["VPP", "VRMS", "DBM"] = "VPP", + phase: float = 0, + offset: float = 0, + ramp_symmetry: float = 50, + pulse_width: float = 20, + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + rm = pyvisa.ResourceManager("@py") + if VISA_address == "": + VISA_addresses = rm.list_resources() + VISA_address = VISA_addresses[int(VISA_index)] + + try: + ks = Keysight33512B( + "ks", + VISA_address, + visalib="@py", + device_clear=False, + ) + except USBError as err: + raise Exception( + "USB port error. Trying unplugging+replugging the port." + ) from err + + channel_str = channel + channel = getattr(ks, channel) + + if on_off == "OFF": + channel.output("OFF") + + match query_set: + case "set": + assert ( + -360.0 <= phase <= 360.0 + ), "The phase must be between -360 and 360 degrees." + assert ( + 0.0 <= ramp_symmetry <= 100.0 + ), "The ramp_symmetry must be between -0 and 100." + assert ( + pulse_width >= 16 + ), "The pulse_width must be greater than or equal to 16 ns" + + channel.function_type(waveform) + channel.amplitude_unit(amplitude_unit) + channel.amplitude(amplitude) + channel.phase(phase) + channel.offset(offset) + channel.frequency(frequency) + if waveform == "RAMP": + channel.ramp_symmetry(ramp_symmetry) + if waveform == "PULS": + channel.pulse_width(pulse_width) + + summary = f"{channel_str}: {waveform}, amplitude: {amplitude} " + summary += f"{amplitude_unit}, frequency: {frequency} Hz" + + case "query": + summary = f"{channel_str}: " + waveform = channel.function_type() + summary += f"waveform: {waveform}, \n" + amplitude_unit = channel.amplitude_unit() + amplitude = channel.amplitude() + summary += f"amplitude: {amplitude} {amplitude_unit}, \n" + frequency = channel.frequency() + summary += f"frequency: {frequency} Hz, \n" + phase = channel.phase() + summary += f"phase: {phase}, \n" + offset = channel.offset() + summary += f"offset: {offset} V, \n" + if waveform == "RAMP": + channel.ramp_symmetry(ramp_symmetry) + summary += f"ramp_symmetry: {ramp_symmetry}%, \n" + if waveform == "PULS": + channel.pulse_width(pulse_width) + summary += f"pulse_width: {pulse_width}, \n" + + if on_off == "ON": + channel.output("ON") + + ks.close() + + return TextBlob(text_blob=summary) diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/examples/EX1/app.json new file mode 100644 index 000000000..d287b26ea --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/examples/EX1/app.json @@ -0,0 +1,540 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 384, + "height": 288, + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "type": "VISUALIZERS", + "data": { + "id": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "label": "TEXT VIEW", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "TextBlob", + "multiple": false, + "desc": "the DataContainer to be visualized in text format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "selected": false + }, + "position": { + "x": 126.63251436934425, + "y": -126.35743104815421 + }, + "selected": false, + "positionAbsolute": { + "x": 126.63251436934425, + "y": -126.35743104815421 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "SET_WAVEFORM_33510B-5d984289-23fd-4a07-8581-9e67f458275a", + "type": "IO", + "data": { + "id": "SET_WAVEFORM_33510B-5d984289-23fd-4a07-8581-9e67f458275a", + "label": "QUERY WAVEFORM 33510B", + "func": "SET_WAVEFORM_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "VISA_address", + "value": "USB0::2391::9735::MY59003244::0::INSTR" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "VISA_index", + "value": 0 + }, + "on_off": { + "type": "select", + "options": [ + "ON", + "OFF" + ], + "default": "OFF", + "desc": "Whether to turn the waveform generation to on or off.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "on_off", + "value": "ON" + }, + "query_set": { + "type": "select", + "options": [ + "query", + "set" + ], + "default": "query", + "desc": "Whether to query or set the waveform.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "query_set", + "value": "query" + }, + "channel": { + "type": "select", + "options": [ + "ch1", + "ch2" + ], + "default": "ch1", + "desc": "The channel to set or query.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "channel", + "value": "ch1" + }, + "waveform": { + "type": "select", + "options": [ + "SIN", + "SQU", + "TRI", + "RAMP", + "PULS", + "PRBS", + "NOIS", + "ARB", + "DC" + ], + "default": "SIN", + "desc": "The type of waveform to use.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "waveform", + "value": "SIN" + }, + "frequency": { + "type": "float", + "default": 1000000, + "desc": "The voltage of the waveform to set, in Hz.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "frequency", + "value": 1000000 + }, + "amplitude": { + "type": "float", + "default": 0.1, + "desc": "The voltage of the waveform to set.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "amplitude", + "value": 0.1 + }, + "amplitude_unit": { + "type": "select", + "options": [ + "VPP", + "VRMS", + "DBM" + ], + "default": "VPP", + "desc": "The voltage unit to set the waveform to.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "amplitude_unit", + "value": "VPP" + }, + "phase": { + "type": "float", + "default": 0, + "desc": "The phase to set the waveform to, in degrees.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "phase", + "value": 0 + }, + "offset": { + "type": "float", + "default": 0, + "desc": "The voltage offset to set the waveform to, in volts.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "offset", + "value": 0 + }, + "ramp_symmetry": { + "type": "float", + "default": 50, + "desc": "The ramp symmetry if the RAMP waveform is used, in percent.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "ramp_symmetry", + "value": 50 + }, + "pulse_width": { + "type": "float", + "default": 20, + "desc": "The pulse width in nanoseconds if the PULS waveform is used.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "pulse_width", + "value": 20 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "Scalar: The waveform measurement in the selected statistic mode." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/SET_WAVEFORM_33510B.py", + "selected": false + }, + "position": { + "x": -235.3146615647039, + "y": -80.09846489697861 + }, + "selected": false, + "positionAbsolute": { + "x": -235.3146615647039, + "y": -80.09846489697861 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "SET_WAVEFORM_33510B-cff57b5b-40b6-48a6-bce1-b72039d971a5", + "type": "IO", + "data": { + "id": "SET_WAVEFORM_33510B-cff57b5b-40b6-48a6-bce1-b72039d971a5", + "label": "SET WAVEFORM 33510B 1", + "func": "SET_WAVEFORM_33510B", + "type": "IO", + "ctrls": { + "VISA_address": { + "type": "str", + "default": null, + "desc": "The VISA address to query.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "VISA_address", + "value": "USB0::2391::9735::MY59003244::0::INSTR" + }, + "VISA_index": { + "type": "int", + "default": 0, + "desc": "The address will be found from LIST_VISA node list with this index.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "VISA_index", + "value": 0 + }, + "on_off": { + "type": "select", + "options": [ + "ON", + "OFF" + ], + "default": "OFF", + "desc": "Whether to turn the waveform generation to on or off.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "on_off", + "value": "OFF" + }, + "query_set": { + "type": "select", + "options": [ + "query", + "set" + ], + "default": "query", + "desc": "Whether to query or set the waveform.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "query_set", + "value": "set" + }, + "channel": { + "type": "select", + "options": [ + "ch1", + "ch2" + ], + "default": "ch1", + "desc": "The channel to set or query.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "channel", + "value": "ch1" + }, + "waveform": { + "type": "select", + "options": [ + "SIN", + "SQU", + "TRI", + "RAMP", + "PULS", + "PRBS", + "NOIS", + "ARB", + "DC" + ], + "default": "SIN", + "desc": "The type of waveform to use.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "waveform", + "value": "SIN" + }, + "frequency": { + "type": "float", + "default": 1000000, + "desc": "The voltage of the waveform to set, in Hz.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "frequency", + "value": 1000000 + }, + "amplitude": { + "type": "float", + "default": 0.1, + "desc": "The voltage of the waveform to set.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "amplitude", + "value": 0.2 + }, + "amplitude_unit": { + "type": "select", + "options": [ + "VPP", + "VRMS", + "DBM" + ], + "default": "VPP", + "desc": "The voltage unit to set the waveform to.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "amplitude_unit", + "value": "VPP" + }, + "phase": { + "type": "float", + "default": 0, + "desc": "The phase to set the waveform to, in degrees.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "phase", + "value": 0 + }, + "offset": { + "type": "float", + "default": 0, + "desc": "The voltage offset to set the waveform to, in volts.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "offset", + "value": 0 + }, + "ramp_symmetry": { + "type": "float", + "default": 50, + "desc": "The ramp symmetry if the RAMP waveform is used, in percent.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "ramp_symmetry", + "value": 50 + }, + "pulse_width": { + "type": "float", + "default": 20, + "desc": "The pulse width in nanoseconds if the PULS waveform is used.", + "overload": null, + "functionName": "SET_WAVEFORM_33510B", + "param": "pulse_width", + "value": 20 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "Scalar: The waveform measurement in the selected statistic mode." + } + ], + "pip_dependencies": [ + { + "name": "pyvisa", + "v": "1.13.0" + }, + { + "name": "pyusb", + "v": "1.2.1" + }, + { + "name": "zeroconf", + "v": "0.102.0" + }, + { + "name": "pyvisa_py", + "v": "0.7.0" + }, + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/FUNCTION_GENERATORS/KEYSIGHT/33XXX/BASIC/SET_WAVEFORM_33510B/SET_WAVEFORM_33510B.py", + "selected": false + }, + "position": { + "x": -587.0980217998496, + "y": -74.46641189574345 + }, + "selected": false, + "positionAbsolute": { + "x": -587.0980217998496, + "y": -74.46641189574345 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "type": "IO", + "data": { + "id": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "label": "CLOSE ALL", + "func": "CLOSE_ALL", + "type": "IO", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "optional: The input DataContainer is returned." + } + ], + "pip_dependencies": [ + { + "name": "qcodes", + "v": "0.39.1" + } + ], + "path": "IO/INSTRUMENTS/QCODES/CLOSE_ALL/CLOSE_ALL.py", + "selected": false + }, + "position": { + "x": -919.3821328184661, + "y": -74.54262269929615 + }, + "selected": false, + "positionAbsolute": { + "x": -919.3821328184661, + "y": -74.54262269929615 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "SET_WAVEFORM_33510B-5d984289-23fd-4a07-8581-9e67f458275a", + "sourceHandle": "default", + "target": "TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0e", + "targetHandle": "default", + "id": "reactflow__edge-SET_WAVEFORM_33510B-5d984289-23fd-4a07-8581-9e67f458275adefault-TEXT_VIEW-819c7e1c-0ff5-4c09-8a13-b65b1e1bab0edefault" + }, + { + "source": "SET_WAVEFORM_33510B-cff57b5b-40b6-48a6-bce1-b72039d971a5", + "sourceHandle": "default", + "target": "SET_WAVEFORM_33510B-5d984289-23fd-4a07-8581-9e67f458275a", + "targetHandle": "default", + "id": "reactflow__edge-SET_WAVEFORM_33510B-cff57b5b-40b6-48a6-bce1-b72039d971a5default-SET_WAVEFORM_33510B-5d984289-23fd-4a07-8581-9e67f458275adefault" + }, + { + "source": "CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7", + "sourceHandle": "default", + "target": "SET_WAVEFORM_33510B-cff57b5b-40b6-48a6-bce1-b72039d971a5", + "targetHandle": "default", + "id": "reactflow__edge-CLOSE_ALL-5ce40df5-d7b2-4c4c-a350-028ed7d948d7default-SET_WAVEFORM_33510B-cff57b5b-40b6-48a6-bce1-b72039d971a5default" + } + ], + "viewport": { + "x": 1104.261946392206, + "y": 573.1338859553202, + "zoom": 1.2154437530123414 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/MOCK/WEINSCHEL8320/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/MOCK/WEINSCHEL8320/a1-[autogen]/docstring.txt index 445682604..d725b25f4 100644 --- a/docs/nodes/IO/INSTRUMENTS/MOCK/WEINSCHEL8320/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/MOCK/WEINSCHEL8320/a1-[autogen]/docstring.txt @@ -1,12 +1,11 @@ -Note this node is for testing purposes only. +The WEINSCHEL8320 node mocks the WEINSCHEL 8320 instrument, which attenuates the input signal. - The WEINSCHEL8320 node mocks the instrument WEINSCHEL 8320. - The Weinschel 8320 attenuates the input signal. + Note: This node is for testing purposes only. Parameters ---------- attenuation : int - Value that the instrument would attenuate the input signal (mocked). + Value at which the instrument would attenuate the input signal (mocked). Returns ------- diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt index 122c7539a..9381f789b 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt @@ -15,23 +15,25 @@ The ADVANCED_MEASUREMENTS_MDO3XXX node extracts waveform measurements from an MD instant, mean, max, min, and stdev where instant is a single measurement and stdev is the standard deviation of the mean. - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): - MDO4xxx, MSO4xxx, and DPO4xxx. + MDO4xxx, MSO4xxx, and DPO4xxx. Many of the advanced measurements are likely + to not function with different model numbers. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). + channel: int + The channel with which to create a measurement for. + measurement: str + The measurement to make. + statistic: str + The type of statistic to take for the measurement. Returns ------- DataContainer - OrderedPair: The trace of the oscilloscope is + Scalar: The measurement from the oscilloscope channel. diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt index 0f76672c0..41cf2e26b 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,33 +1,18 @@ -from flojoy import flojoy, DataContainer, Scalar -import pyvisa +from flojoy import flojoy, DataContainer, Scalar, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def ADVANCED_MEASUREMENTS_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, channel: int = 0, measurement: str = "period", statistic: Literal["instant", "mean", "max", "min", "stdev"] = "instant", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> Scalar: - assert channel < num_channels, "Channel must be less than num_channels." - - measures = set( + measures = { "amplitude", "area", "burst", @@ -80,29 +65,13 @@ def ADVANCED_MEASUREMENTS_MDO3XXX( "stddev", "undefined", "waveforms", - ) + } assert ( measurement in measures ), f"The select measurement ({measurement}) is not availble." - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() tek.measurement[0].source1(f"CH{int(channel + 1)}") @@ -114,6 +83,4 @@ def ADVANCED_MEASUREMENTS_MDO3XXX( measurement = getattr(measurement, statistic) value = measurement() - tek.close() - return Scalar(c=value) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/examples/EX1/app.json index 2c59c6c23..226a599aa 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/examples/EX1/app.json @@ -4,14 +4,33 @@ { "width": 192, "height": 192, - "id": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "type": "IO", "data": { - "id": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", - "label": "LIST VISA", - "func": "LIST_VISA", + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", - "ctrls": {}, + "ctrls": { + "device": { + "type": "VisaDevice", + "default": null, + "desc": "The VISA address to connect to.", + "overload": null, + "functionName": "CONNECTION_MDO3XXX", + "param": "device", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "num_channels": { + "type": "int", + "default": 4, + "desc": "The number of channels on the instrument that are currently in use.", + "overload": null, + "functionName": "CONNECTION_MDO3XXX", + "param": "num_channels", + "value": 2 + } + }, "initCtrls": {}, "inputs": [ { @@ -27,93 +46,170 @@ "name": "default", "id": "default", "type": "Any", - "desc": "optional: The input DataContainer is returned." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" + "desc": "Optional: None" } ], - "path": "IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": -723.0785771711177, - "y": 525.3171553398978 + "x": -255.44879430712533, + "y": -98.564770643341 }, "selected": false, "positionAbsolute": { - "x": -723.0785771711177, - "y": 525.3171553398978 + "x": -255.44879430712533, + "y": -98.564770643341 }, "dragging": true }, { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54", - "type": "VISUALIZERS", + "width": 192, + "height": 192, + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "type": "IO", "data": { - "id": "TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54", - "label": "TEXT VIEW", - "func": "TEXT_VIEW", - "type": "VISUALIZERS", - "ctrls": {}, + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "label": "EXTRACT TRACE CH1", + "func": "EXTRACT_TRACE_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "channel": { + "type": "int", + "default": 0, + "desc": null, + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "channel", + "value": 0 + }, + "x_length": { + "type": "int", + "default": 5000, + "desc": "The length of the trace to extract.", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "x_length", + "value": 500 + }, + "length_type": { + "type": "select", + "options": [ + "pixels", + "nanoseconds" + ], + "default": "pixels", + "desc": "The units of the length specified in x_length: nanoseconds or pixels.", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "length_type", + "value": "nanoseconds" + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "TextBlob", + "type": "Any", "multiple": false, - "desc": "the DataContainer to be visualized in text format" + "desc": null } ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "outputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair", + "desc": "OrderedPair: The trace of the oscilloscope is returned." + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", "selected": false }, "position": { - "x": -251.19193841906153, - "y": 343.48432258290853 + "x": 130.0358104923503, + "y": -284.8055974025993 }, "selected": false, "positionAbsolute": { - "x": -251.19193841906153, - "y": 343.48432258290853 + "x": 130.0358104923503, + "y": -284.8055974025993 }, "dragging": true }, { "width": 380, "height": 293, - "id": "TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053", + "id": "BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35", "type": "VISUALIZERS", "data": { - "id": "TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053", - "label": "TABLE 2", - "func": "TABLE", + "id": "BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35", + "label": "BIG NUMBER", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": true + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "OrderedPair|Scalar|Vector", "multiple": false, "desc": "the DataContainer to be visualized" } @@ -123,78 +219,60 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 47.079250672949854, - "y": 474.0590654431728 + "x": 518.5383675018643, + "y": 18.73411176197044 }, "selected": false, "positionAbsolute": { - "x": 47.079250672949854, - "y": 474.0590654431728 + "x": 518.5383675018643, + "y": 18.73411176197044 }, "dragging": true }, { "width": 192, "height": 192, - "id": "ADVANCED_MEASUREMENTS_MDO3xxx-ad5e2759-b98b-46f4-b215-5f7fe1fbb793", + "id": "ADVANCED_MEASUREMENTS_MDO3XXX-aeaf88a6-543f-4405-9697-456be37da742", "type": "IO", "data": { - "id": "ADVANCED_MEASUREMENTS_MDO3xxx-ad5e2759-b98b-46f4-b215-5f7fe1fbb793", - "label": "ADVANCED MEASUREMENTS MDO3xxx", - "func": "ADVANCED_MEASUREMENTS_MDO3xxx", + "id": "ADVANCED_MEASUREMENTS_MDO3XXX-aeaf88a6-543f-4405-9697-456be37da742", + "label": "ADVANCED MEASUREMENTS Rise Time (s)", + "func": "ADVANCED_MEASUREMENTS_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "ADVANCED_MEASUREMENTS_MDO3xxx", - "param": "VISA_address", + "functionName": "ADVANCED_MEASUREMENTS_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "ADVANCED_MEASUREMENTS_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "ADVANCED_MEASUREMENTS_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, - "desc": null, + "desc": "The channel with which to create a measurement for.", "overload": null, - "functionName": "ADVANCED_MEASUREMENTS_MDO3xxx", + "functionName": "ADVANCED_MEASUREMENTS_MDO3XXX", "param": "channel", "value": 0 }, "measurement": { "type": "str", "default": "period", - "desc": null, + "desc": "The measurement to make.", "overload": null, - "functionName": "ADVANCED_MEASUREMENTS_MDO3xxx", + "functionName": "ADVANCED_MEASUREMENTS_MDO3XXX", "param": "measurement", - "value": "fall" + "value": "rise" }, "statistic": { "type": "select", @@ -206,9 +284,9 @@ "stdev" ], "default": "instant", - "desc": null, + "desc": "The type of statistic to take for the measurement.", "overload": null, - "functionName": "ADVANCED_MEASUREMENTS_MDO3xxx", + "functionName": "ADVANCED_MEASUREMENTS_MDO3XXX", "param": "statistic", "value": "instant" } @@ -227,74 +305,102 @@ { "name": "default", "id": "default", - "type": "Any", - "desc": "OrderedPair: The trace of the oscilloscope is" + "type": "Scalar", + "desc": "Scalar: The measurement from the oscilloscope channel." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/ADVANCED_MEASUREMENTS_MDO3XXX.py", + "selected": true + }, + "position": { + "x": 124.57314459031954, + "y": 66.47911682859728 + }, + "selected": true, + "positionAbsolute": { + "x": 124.57314459031954, + "y": 66.47911682859728 + }, + "dragging": true + }, + { + "width": 380, + "height": 293, + "id": "LINE-b72c0154-74fc-44e5-ba43-8a3bd91d6ef1", + "type": "VISUALIZERS", + "data": { + "id": "LINE-b72c0154-74fc-44e5-ba43-8a3bd91d6ef1", + "label": "LINE", + "func": "LINE", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ { - "name": "pyvisa_py", - "v": "0.7.0" - }, + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ { - "name": "qcodes", - "v": "0.39.1" + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing the Plotly Line visualization of the input data" } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/ADVANCED_MEASUREMENTS_MDO3xxx/ADVANCED_MEASUREMENTS_MDO3xxx.py", + "path": "VISUALIZERS/PLOTLY/LINE/LINE.py", "selected": false }, "position": { - "x": -355.5227196324611, - "y": 524.0106443603165 + "x": 530.2324516876912, + "y": -305.24892486085355 }, "selected": false, "positionAbsolute": { - "x": -355.5227196324611, - "y": 524.0106443603165 + "x": 530.2324516876912, + "y": -305.24892486085355 }, "dragging": true } ], "edges": [ { - "source": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "sourceHandle": "default", + "target": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "targetHandle": "default", + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault" + }, + { + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "sourceHandle": "default", - "target": "TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54", + "target": "ADVANCED_MEASUREMENTS_MDO3XXX-aeaf88a6-543f-4405-9697-456be37da742", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60default-TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-ADVANCED_MEASUREMENTS_MDO3XXX-aeaf88a6-543f-4405-9697-456be37da742default" }, { - "source": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "source": "ADVANCED_MEASUREMENTS_MDO3XXX-aeaf88a6-543f-4405-9697-456be37da742", "sourceHandle": "default", - "target": "ADVANCED_MEASUREMENTS_MDO3xxx-ad5e2759-b98b-46f4-b215-5f7fe1fbb793", + "target": "BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60default-ADVANCED_MEASUREMENTS_MDO3xxx-ad5e2759-b98b-46f4-b215-5f7fe1fbb793default" + "id": "reactflow__edge-ADVANCED_MEASUREMENTS_MDO3XXX-aeaf88a6-543f-4405-9697-456be37da742default-BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35default" }, { - "source": "ADVANCED_MEASUREMENTS_MDO3xxx-ad5e2759-b98b-46f4-b215-5f7fe1fbb793", + "source": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", "sourceHandle": "default", - "target": "TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053", + "target": "LINE-b72c0154-74fc-44e5-ba43-8a3bd91d6ef1", "targetHandle": "default", - "id": "reactflow__edge-ADVANCED_MEASUREMENTS_MDO3xxx-ad5e2759-b98b-46f4-b215-5f7fe1fbb793default-TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053default" + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault-LINE-b72c0154-74fc-44e5-ba43-8a3bd91d6ef1default" } ], "viewport": { - "x": 855.945537953298, - "y": 287.6844024349923, - "zoom": 2 + "x": 1136.4492687849445, + "y": 584.5880790869217, + "zoom": 1.2397346348267997 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/docstring.txt index b27f0dbc4..2dd680571 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/docstring.txt @@ -2,21 +2,16 @@ The TRIGGER_SETTINGS_MDO3XXX node sets advanced trigger settings. Note that "unchanged" will leave the settings unchanged. - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): MDO4xxx, MSO4xxx, and DPO4xxx. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). query_set: str Whether to query or set the triggering channel. edge_couplings: str diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/python_code.txt index 0cb4f2f98..85f644a77 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,23 +1,10 @@ -from flojoy import flojoy, DataContainer, TextBlob -import pyvisa +from flojoy import flojoy, DataContainer, TextBlob, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def TRIGGER_SETTINGS_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, query_set: Literal["query", "set"] = "query", edge_couplings: Literal[ "unchanged", "ac", "dc", "hfrej", "lfrej", "noiserej" @@ -25,46 +12,23 @@ def TRIGGER_SETTINGS_MDO3XXX( trigger_types: Literal["unchanged", "edge", "logic", "pulse"] = "unchanged", edge_slope: Literal["unchanged", "rise", "fall", "either"] = "unchanged", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> TextBlob: - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] + tek = connection.get_handle() - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + match query_set: + case "query": + edge_couplings = tek.trigger.edge_coupling() + trigger_types = tek.trigger.type() + edge_slope = tek.trigger.edge_slope() - if edge_couplings != "unchanged": - match query_set: - case "query": + case "set": + if edge_couplings != "unchanged": edge_couplings = tek.trigger.edge_coupling() - case "set": - tek.trigger.edge_coupling(edge_couplings) - - if trigger_types != "unchanged": - match query_set: - case "query": - trigger_types = tek.trigger.type() - case "set": + if trigger_types != "unchanged": tek.trigger.type(trigger_types) - - if edge_slope != "unchanged": - match query_set: - case "query": - edge_slope = tek.trigger.edge_slope() - case "set": + if edge_slope != "unchanged": tek.trigger.edge_slope(edge_slope) s = str( @@ -73,6 +37,4 @@ def TRIGGER_SETTINGS_MDO3XXX( f"Edge slope: {edge_slope}" ) - tek.close() - return TextBlob(text_blob=s) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/examples/EX1/app.json index 1edf461e4..4db10b235 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/examples/EX1/app.json @@ -2,217 +2,68 @@ "rfInstance": { "nodes": [ { - "width": 192, - "height": 192, - "id": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", - "type": "IO", + "width": 384, + "height": 288, + "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "type": "VISUALIZERS", "data": { - "id": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", - "label": "TRIGGER SETTINGS MDO3xxx", - "func": "TRIGGER_SETTINGS_MDO3xxx", - "type": "IO", - "ctrls": { - "VISA_address": { - "type": "str", - "default": null, - "desc": "The VISA address to query.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "VISA_address", - "value": "USB0::1689::1032::C012101::0::INSTR" - }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "num_channels", - "value": 2 - }, - "query_set": { - "type": "select", - "options": [ - "query", - "set" - ], - "default": "query", - "desc": "Whether to query or set the triggering channel.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "query_set", - "value": "set" - }, - "edge_couplings": { - "type": "select", - "options": [ - "unchanged", - "ac", - "dc", - "hfrej", - "lfrej", - "noiserej" - ], - "default": "unchanged", - "desc": "Set the trigger edge coupling type.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "edge_couplings", - "value": "ac" - }, - "trigger_types": { - "type": "select", - "options": [ - "unchanged", - "edge", - "logic", - "pulse" - ], - "default": "unchanged", - "desc": "Set to trigger on edge, logic, or pulses.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "trigger_types", - "value": "edge" - }, - "edge_slope": { - "type": "select", - "options": [ - "unchanged", - "rise", - "fall", - "either" - ], - "default": "unchanged", - "desc": "Set to trigger on positive, negative, or either slopes.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "edge_slope", - "value": "rise" - } - }, + "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "label": "TEXT VIEW", + "func": "TEXT_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "Any", + "type": "TextBlob", "multiple": false, - "desc": null - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Any", - "desc": "TextBlob: Summary of trigger settings." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" + "desc": "the DataContainer to be visualized in text format" } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/TRIGGER_SETTINGS_MDO3xxx/TRIGGER_SETTINGS_MDO3xxx.py", + "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", "selected": false }, "position": { - "x": 548.9361334388789, - "y": 4.503296195828 + "x": 964.1822969308419, + "y": -104.37263568320691 }, "selected": false, "positionAbsolute": { - "x": 548.9361334388789, - "y": 4.503296195828 + "x": 964.1822969308419, + "y": -104.37263568320691 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "id": "CONNECTION_MDO3XXX-2a8773e7-2c57-4f02-b3a6-f48bd1c6413c", "type": "IO", "data": { - "id": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", - "label": "TRIGGER CHANNEL MDO3xxx", - "func": "TRIGGER_CHANNEL_MDO3xxx", + "id": "CONNECTION_MDO3XXX-2a8773e7-2c57-4f02-b3a6-f48bd1c6413c", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "device": { + "type": "VisaDevice", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address to connect to.", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "VISA_address", + "functionName": "CONNECTION_MDO3XXX", + "param": "device", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, "num_channels": { "type": "int", "default": 4, "desc": "The number of channels on the instrument that are currently in use.", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", + "functionName": "CONNECTION_MDO3XXX", "param": "num_channels", "value": 2 - }, - "channel": { - "type": "int", - "default": 0, - "desc": "The channel to set as the triggering channel (used if setting).", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "channel", - "value": 1 - }, - "query_set": { - "type": "select", - "options": [ - "query", - "set" - ], - "default": "query", - "desc": "Whether to query or set the triggering channel.", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "query_set", - "value": "set" } }, "initCtrls": {}, @@ -230,104 +81,102 @@ "name": "default", "id": "default", "type": "Any", - "desc": "TextBlob: The triggering channel (e.g. CH1)." + "desc": "Optional: None" } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TRIGGER_CHANNEL_MDO3xxx/TRIGGER_CHANNEL_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": -333.19502014401803, - "y": 4.5596734231639005 + "x": 261.6429352205555, + "y": -47.202790829975726 }, "selected": false, "positionAbsolute": { - "x": -333.19502014401803, - "y": 4.5596734231639005 + "x": 261.6429352205555, + "y": -47.202790829975726 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "id": "TRIGGER_SETTINGS_MDO3XXX-7a1c35c4-18cb-4609-9b40-f2a1a429ef7a", "type": "IO", "data": { - "id": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", - "label": "TRIGGER LEVEL MDO3xxx", - "func": "TRIGGER_LEVEL_MDO3xxx", + "id": "TRIGGER_SETTINGS_MDO3XXX-7a1c35c4-18cb-4609-9b40-f2a1a429ef7a", + "label": "TRIGGER SETTINGS MDO3XXX", + "func": "TRIGGER_SETTINGS_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_SETTINGS_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", + "query_set": { + "type": "select", + "options": [ + "query", + "set" + ], + "default": "query", + "desc": "Whether to query or set the triggering channel.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "VISA_index", - "value": 0 + "functionName": "TRIGGER_SETTINGS_MDO3XXX", + "param": "query_set", + "value": "query" }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", + "edge_couplings": { + "type": "select", + "options": [ + "unchanged", + "ac", + "dc", + "hfrej", + "lfrej", + "noiserej" + ], + "default": "unchanged", + "desc": "Set the trigger edge coupling type.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "num_channels", - "value": 2 + "functionName": "TRIGGER_SETTINGS_MDO3XXX", + "param": "edge_couplings", + "value": "unchanged" }, - "trigger_volts": { - "type": "float", - "default": 0.1, - "desc": "The voltage to set the triggering level to.", + "trigger_types": { + "type": "select", + "options": [ + "unchanged", + "edge", + "logic", + "pulse" + ], + "default": "unchanged", + "desc": "Set to trigger on edge, logic, or pulses.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "trigger_volts", - "value": 0.05 + "functionName": "TRIGGER_SETTINGS_MDO3XXX", + "param": "trigger_types", + "value": "unchanged" }, - "query_set": { + "edge_slope": { "type": "select", "options": [ - "query", - "set" + "unchanged", + "rise", + "fall", + "either" ], - "default": "query", - "desc": "Whether to query or set the triggering voltage.", + "default": "unchanged", + "desc": "Set to trigger on positive, negative, or either slopes.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "query_set", - "value": "set" + "functionName": "TRIGGER_SETTINGS_MDO3XXX", + "param": "edge_slope", + "value": "unchanged" } }, "initCtrls": {}, @@ -341,198 +190,42 @@ } ], "outputs": [ - { - "name": "default", - "id": "default", - "type": "Any", - "desc": "Scalar: The triggering voltage." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TRIGGER_LEVEL_MDO3xxx/TRIGGER_LEVEL_MDO3xxx.py", - "selected": false - }, - "position": { - "x": 130.12284142919947, - "y": -0.0042271661209838385 - }, - "selected": false, - "positionAbsolute": { - "x": 130.12284142919947, - "y": -0.0042271661209838385 - }, - "dragging": true - }, - { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", - "type": "VISUALIZERS", - "data": { - "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", - "label": "TEXT VIEW", - "func": "TEXT_VIEW", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ { "name": "default", "id": "default", "type": "TextBlob", - "multiple": false, - "desc": "the DataContainer to be visualized in text format" - } - ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", - "selected": false - }, - "position": { - "x": 942.5982011541996, - "y": -45.01637229744068 - }, - "selected": false, - "positionAbsolute": { - "x": 942.5982011541996, - "y": -45.01637229744068 - }, - "dragging": true - }, - { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", - "type": "VISUALIZERS", - "data": { - "id": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", - "label": "TEXT VIEW 1", - "func": "TEXT_VIEW", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "TextBlob", - "multiple": false, - "desc": "the DataContainer to be visualized in text format" - } - ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", - "selected": false - }, - "position": { - "x": 102.63900384280683, - "y": -269.7519096052588 - }, - "selected": false, - "positionAbsolute": { - "x": 102.63900384280683, - "y": -269.7519096052588 - }, - "dragging": true - }, - { - "width": 380, - "height": 293, - "id": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", - "type": "VISUALIZERS", - "data": { - "id": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", - "label": "TABLE", - "func": "TABLE", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", - "multiple": false, - "desc": "the DataContainer to be visualized" - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "TextBlob: Summary of trigger settings." } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/TRIGGER_SETTINGS_MDO3XXX.py", "selected": false }, "position": { - "x": 538.5213471606752, - "y": -269.79286044112655 + "x": 601.85782255167, + "y": -49.49861434039147 }, "selected": false, "positionAbsolute": { - "x": 538.5213471606752, - "y": -269.79286044112655 + "x": 601.85782255167, + "y": -49.49861434039147 }, "dragging": true } ], "edges": [ { - "source": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", - "sourceHandle": "default", - "target": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", - "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3badefault-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default" - }, - { - "source": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", - "sourceHandle": "default", - "target": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", - "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3badefault-TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fedefault" - }, - { - "source": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", - "sourceHandle": "default", - "target": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", - "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default-TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215bdefault" - }, - { - "source": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "source": "CONNECTION_MDO3XXX-2a8773e7-2c57-4f02-b3a6-f48bd1c6413c", "sourceHandle": "default", - "target": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", + "target": "TRIGGER_SETTINGS_MDO3XXX-7a1c35c4-18cb-4609-9b40-f2a1a429ef7a", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default-TABLE-c8942fe3-268d-46e7-8a9b-be02d64720dadefault" + "id": "reactflow__edge-CONNECTION_MDO3XXX-2a8773e7-2c57-4f02-b3a6-f48bd1c6413cdefault-TRIGGER_SETTINGS_MDO3XXX-7a1c35c4-18cb-4609-9b40-f2a1a429ef7adefault" }, { - "source": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "source": "TRIGGER_SETTINGS_MDO3XXX-7a1c35c4-18cb-4609-9b40-f2a1a429ef7a", "sourceHandle": "default", "target": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215bdefault-TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40default" + "id": "reactflow__edge-TRIGGER_SETTINGS_MDO3XXX-7a1c35c4-18cb-4609-9b40-f2a1a429ef7adefault-TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40default" } ], "viewport": { diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.md b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.md new file mode 100644 index 000000000..c65dff3d9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..c7d8b6fd4 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/a1-[autogen]/docstring.txt @@ -0,0 +1,18 @@ +The CONNECTION_MDO3XXX node connects Flojoy to a MDO3XXX oscilloscope. + + The connection is made with the VISA address in the Flojoy UI. + + This node should also work with compatible Tektronix scopes (untested): + MDO4xxx, MSO4xxx, and DPO4xxx. + + Parameters + ---------- + device: VisaDevice + The VISA address to connect to. + num_channels: int + The number of channels on the instrument that are currently in use. + + Returns + ------- + DataContainer + Optional: None diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..8780571b0 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/a1-[autogen]/python_code.txt @@ -0,0 +1,31 @@ +from flojoy import VisaDevice, flojoy, DataContainer +from flojoy.connection_manager import DeviceConnectionManager +from typing import Optional +from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx +from usb.core import USBError + + +@flojoy() +def CONNECTION_MDO3XXX( + device: VisaDevice, + num_channels: int = 4, + default: Optional[DataContainer] = None, +) -> Optional[DataContainer]: + + + try: + tek = TektronixMDO30xx( + "MDO30xx", + device.get_id(), + visalib="@py", + device_clear=False, + number_of_channels=num_channels, + ) + except USBError as err: + raise Exception( + "USB port error. Trying unplugging+replugging the port." + ) from err + + DeviceConnectionManager.register_connection(device, tek) + + return None diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/examples/EX1/app.json new file mode 100644 index 000000000..764909163 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/examples/EX1/app.json @@ -0,0 +1,352 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 192, + "height": 192, + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "type": "IO", + "data": { + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", + "type": "IO", + "ctrls": { + "device": { + "type": "VisaDevice", + "default": null, + "desc": "The VISA address to connect to.", + "overload": null, + "functionName": "CONNECTION_MDO3XXX", + "param": "device", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "num_channels": { + "type": "int", + "default": 4, + "desc": "The number of channels on the instrument that are currently in use.", + "overload": null, + "functionName": "CONNECTION_MDO3XXX", + "param": "num_channels", + "value": 2 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "Optional: None" + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", + "selected": false + }, + "position": { + "x": -255.44879430712533, + "y": -98.564770643341 + }, + "selected": false, + "positionAbsolute": { + "x": -255.44879430712533, + "y": -98.564770643341 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "type": "IO", + "data": { + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "label": "EXTRACT TRACE CH1", + "func": "EXTRACT_TRACE_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "channel": { + "type": "int", + "default": 0, + "desc": null, + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "channel", + "value": 0 + }, + "x_length": { + "type": "int", + "default": 5000, + "desc": "The length of the trace to extract.", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "x_length", + "value": 1000 + }, + "length_type": { + "type": "select", + "options": [ + "pixels", + "nanoseconds" + ], + "default": "pixels", + "desc": "The units of the length specified in x_length: nanoseconds or pixels.", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "length_type", + "value": "nanoseconds" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair", + "desc": "OrderedPair: The trace of the oscilloscope is returned." + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", + "selected": false + }, + "position": { + "x": 113.84773865986861, + "y": -250.27104415997167 + }, + "selected": false, + "positionAbsolute": { + "x": 113.84773865986861, + "y": -250.27104415997167 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", + "type": "IO", + "data": { + "id": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", + "label": "EXTRACT TRACE CH2", + "func": "EXTRACT_TRACE_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "channel": { + "type": "int", + "default": 0, + "desc": null, + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "channel", + "value": 1 + }, + "x_length": { + "type": "int", + "default": 5000, + "desc": "The length of the trace to extract.", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "x_length", + "value": 2500 + }, + "length_type": { + "type": "select", + "options": [ + "pixels", + "nanoseconds" + ], + "default": "pixels", + "desc": "The units of the length specified in x_length: nanoseconds or pixels.", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "length_type", + "value": "pixels" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair", + "desc": "OrderedPair: The trace of the oscilloscope is returned." + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", + "selected": false + }, + "position": { + "x": 111.1114171685565, + "y": 67.69996146361609 + }, + "selected": false, + "positionAbsolute": { + "x": 111.1114171685565, + "y": 67.69996146361609 + }, + "dragging": true + }, + { + "width": 380, + "height": 293, + "id": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "type": "VISUALIZERS", + "data": { + "id": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "label": "COMPOSITE", + "func": "COMPOSITE", + "type": "VISUALIZERS", + "ctrls": { + "first_figure": { + "type": "select", + "options": [ + "bar", + "line", + "histogram", + "scatter" + ], + "default": "scatter", + "desc": "plotly type to display as the first figure, default is 'scatter'", + "overload": null, + "functionName": "COMPOSITE", + "param": "first_figure", + "value": "line" + }, + "second_figure": { + "type": "select", + "options": [ + "bar", + "line", + "histogram", + "scatter" + ], + "default": "line", + "desc": "plotly type to display as the second figure, default is 'line'", + "overload": null, + "functionName": "COMPOSITE", + "param": "second_figure", + "value": "line" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "primary_trace", + "id": "primary_trace", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized as the first figure" + }, + { + "name": "secondary_trace", + "id": "secondary_trace", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized as the second figure" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly visualization of both figures" + } + ], + "path": "VISUALIZERS/PLOTLY/COMPOSITE/COMPOSITE.py", + "selected": false + }, + "position": { + "x": 476.34881803417886, + "y": -117.74799180659221 + }, + "selected": false, + "positionAbsolute": { + "x": 476.34881803417886, + "y": -117.74799180659221 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "sourceHandle": "default", + "target": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "targetHandle": "default", + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault" + }, + { + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "sourceHandle": "default", + "target": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", + "targetHandle": "default", + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault" + }, + { + "source": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "sourceHandle": "default", + "target": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "targetHandle": "primary_trace", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault-COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638primary_trace" + }, + { + "source": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", + "sourceHandle": "default", + "target": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "targetHandle": "secondary_trace", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault-COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638secondary_trace" + } + ], + "viewport": { + "x": 1136.4492687849445, + "y": 584.5880790869217, + "zoom": 1.2397346348267997 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/examples/EX1/example.md b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/examples/EX1/example.md new file mode 100644 index 000000000..e69de29bb diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/docstring.txt index c23708012..1d3665101 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/docstring.txt @@ -5,21 +5,16 @@ The EXTRACT_TRACE_MDO3XXX node extracts the trace from an MDO3xxx oscilloscope. a trace with 5000 points. A length_type of nanoseconds instead results in a trace with a length of defined by the number of (nano)seconds. - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): MDO4xxx, MSO4xxx, and DPO4xxx. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). x_length: int The length of the trace to extract. length_type: select diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/python_code.txt index a2631e86e..bdaa074bb 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,49 +1,18 @@ -from flojoy import flojoy, DataContainer, OrderedPair -import pyvisa +from flojoy import flojoy, DataContainer, OrderedPair, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def EXTRACT_TRACE_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, channel: int = 0, x_length: int = 5000, length_type: Literal["pixels", "nanoseconds"] = "pixels", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> OrderedPair: - assert channel < num_channels, "Channel must be less than num_channels." - - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() match length_type: case "pixels": @@ -54,6 +23,4 @@ def EXTRACT_TRACE_MDO3XXX( x = tek.channel[channel].waveform.trace_axis() y = tek.channel[channel].waveform.trace() - tek.close() - return OrderedPair(x=x, y=y) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/examples/EX1/app.json index dac594b05..764909163 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/examples/EX1/app.json @@ -4,58 +4,102 @@ { "width": 192, "height": 192, - "id": "EXTRACT_TRACE_MDO3xxx-6aa51ca4-4a08-4d49-92b9-80406957dc19", + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "type": "IO", "data": { - "id": "EXTRACT_TRACE_MDO3xxx-6aa51ca4-4a08-4d49-92b9-80406957dc19", - "label": "EXTRACT TRACE CH2", - "func": "EXTRACT_TRACE_MDO3xxx", + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "device": { + "type": "VisaDevice", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address to connect to.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_address", + "functionName": "CONNECTION_MDO3XXX", + "param": "device", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, "num_channels": { "type": "int", "default": 4, "desc": "The number of channels on the instrument that are currently in use.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "CONNECTION_MDO3XXX", "param": "num_channels", "value": 2 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "Optional: None" + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", + "selected": false + }, + "position": { + "x": -255.44879430712533, + "y": -98.564770643341 + }, + "selected": false, + "positionAbsolute": { + "x": -255.44879430712533, + "y": -98.564770643341 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "type": "IO", + "data": { + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "label": "EXTRACT TRACE CH1", + "func": "EXTRACT_TRACE_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" }, "channel": { "type": "int", "default": 0, "desc": null, "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "channel", - "value": 1 + "value": 0 }, "x_length": { "type": "int", "default": 5000, "desc": "The length of the trace to extract.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "x_length", - "value": 2000 + "value": 1000 }, "length_type": { "type": "select", @@ -66,7 +110,7 @@ "default": "pixels", "desc": "The units of the length specified in x_length: nanoseconds or pixels.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "length_type", "value": "nanoseconds" } @@ -85,144 +129,61 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "OrderedPair", "desc": "OrderedPair: The trace of the oscilloscope is returned." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/EXTRACT_TRACE_MDO3xxx/EXTRACT_TRACE_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", "selected": false }, "position": { - "x": -308.2670955191784, - "y": 669.2002904870857 + "x": 113.84773865986861, + "y": -250.27104415997167 }, "selected": false, "positionAbsolute": { - "x": -308.2670955191784, - "y": 669.2002904870857 - }, - "dragging": true - }, - { - "width": 380, - "height": 293, - "id": "LINE-2581565b-e52a-4beb-aea1-f316a9ff1544", - "type": "VISUALIZERS", - "data": { - "id": "LINE-2581565b-e52a-4beb-aea1-f316a9ff1544", - "label": "LINE", - "func": "LINE", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "OrderedPair|DataFrame|Matrix|Vector", - "multiple": false, - "desc": "the DataContainer to be visualized" - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Plotly", - "desc": "the DataContainer containing Plotly Line visualization of the input data" - } - ], - "path": "VISUALIZERS/PLOTLY/LINE/LINE.py", - "selected": false - }, - "position": { - "x": 52.662182243554156, - "y": 622.4542110983697 - }, - "selected": false, - "positionAbsolute": { - "x": 52.662182243554156, - "y": 622.4542110983697 + "x": 113.84773865986861, + "y": -250.27104415997167 }, "dragging": true }, { "width": 192, "height": 192, - "id": "EXTRACT_TRACE_MDO3xxx-ce7d1df1-2a6c-4be0-ba71-e5e0242fc0d0", + "id": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "type": "IO", "data": { - "id": "EXTRACT_TRACE_MDO3xxx-ce7d1df1-2a6c-4be0-ba71-e5e0242fc0d0", - "label": "EXTRACT TRACE CH1", - "func": "EXTRACT_TRACE_MDO3xxx", + "id": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", + "label": "EXTRACT TRACE CH2", + "func": "EXTRACT_TRACE_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_address", + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, "desc": null, "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "channel", - "value": 0 + "value": 1 }, "x_length": { "type": "int", "default": 5000, "desc": "The length of the trace to extract.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "x_length", - "value": 5000 + "value": 2500 }, "length_type": { "type": "select", @@ -233,7 +194,7 @@ "default": "pixels", "desc": "The units of the length specified in x_length: nanoseconds or pixels.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "length_type", "value": "pixels" } @@ -252,227 +213,140 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "OrderedPair", "desc": "OrderedPair: The trace of the oscilloscope is returned." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/EXTRACT_TRACE_MDO3xxx/EXTRACT_TRACE_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", "selected": false }, "position": { - "x": -295.2196374121874, - "y": 175.9498597226176 + "x": 111.1114171685565, + "y": 67.69996146361609 }, "selected": false, "positionAbsolute": { - "x": -295.2196374121874, - "y": 175.9498597226176 + "x": 111.1114171685565, + "y": 67.69996146361609 }, "dragging": true }, { "width": 380, "height": 293, - "id": "LINE-d04523ad-fd65-47b6-bbe3-ef5ec0836e24", + "id": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", "type": "VISUALIZERS", "data": { - "id": "LINE-d04523ad-fd65-47b6-bbe3-ef5ec0836e24", - "label": "LINE 1", - "func": "LINE", + "id": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "label": "COMPOSITE", + "func": "COMPOSITE", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "first_figure": { + "type": "select", + "options": [ + "bar", + "line", + "histogram", + "scatter" + ], + "default": "scatter", + "desc": "plotly type to display as the first figure, default is 'scatter'", + "overload": null, + "functionName": "COMPOSITE", + "param": "first_figure", + "value": "line" + }, + "second_figure": { + "type": "select", + "options": [ + "bar", + "line", + "histogram", + "scatter" + ], + "default": "line", + "desc": "plotly type to display as the second figure, default is 'line'", + "overload": null, + "functionName": "COMPOSITE", + "param": "second_figure", + "value": "line" + } + }, "initCtrls": {}, "inputs": [ { - "name": "default", - "id": "default", + "name": "primary_trace", + "id": "primary_trace", "type": "OrderedPair|DataFrame|Matrix|Vector", "multiple": false, - "desc": "the DataContainer to be visualized" - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Plotly", - "desc": "the DataContainer containing Plotly Line visualization of the input data" - } - ], - "path": "VISUALIZERS/PLOTLY/LINE/LINE.py", - "selected": false - }, - "position": { - "x": 51.37272232786654, - "y": 160.40999745683956 - }, - "selected": false, - "positionAbsolute": { - "x": 51.37272232786654, - "y": 160.40999745683956 - }, - "dragging": true - }, - { - "width": 192, - "height": 192, - "id": "LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897", - "type": "IO", - "data": { - "id": "LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897", - "label": "LIST VISA", - "func": "LIST_VISA", - "type": "IO", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ + "desc": "the DataContainer to be visualized as the first figure" + }, { - "name": "default", - "id": "default", - "type": "Any", + "name": "secondary_trace", + "id": "secondary_trace", + "type": "OrderedPair|DataFrame|Matrix|Vector", "multiple": false, - "desc": null + "desc": "the DataContainer to be visualized as the second figure" } ], "outputs": [ { "name": "default", "id": "default", - "type": "Any", - "desc": "optional: The input DataContainer is returned." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - } - ], - "path": "IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py", - "selected": false - }, - "position": { - "x": -724.1776582947479, - "y": 416.10164161272746 - }, - "selected": false, - "positionAbsolute": { - "x": -724.1776582947479, - "y": 416.10164161272746 - }, - "dragging": true - }, - { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-040c59d9-3254-4fe2-a135-1e07f4a02172", - "type": "VISUALIZERS", - "data": { - "id": "TEXT_VIEW-040c59d9-3254-4fe2-a135-1e07f4a02172", - "label": "TEXT VIEW", - "func": "TEXT_VIEW", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "TextBlob", - "multiple": false, - "desc": "the DataContainer to be visualized in text format" + "type": "Plotly", + "desc": "the DataContainer containing Plotly visualization of both figures" } ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "path": "VISUALIZERS/PLOTLY/COMPOSITE/COMPOSITE.py", "selected": false }, "position": { - "x": -363.64872927730147, - "y": 450.88594118674735 + "x": 476.34881803417886, + "y": -117.74799180659221 }, "selected": false, "positionAbsolute": { - "x": -363.64872927730147, - "y": 450.88594118674735 + "x": 476.34881803417886, + "y": -117.74799180659221 }, "dragging": true } ], "edges": [ { - "source": "EXTRACT_TRACE_MDO3xxx-6aa51ca4-4a08-4d49-92b9-80406957dc19", + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "sourceHandle": "default", - "target": "LINE-2581565b-e52a-4beb-aea1-f316a9ff1544", + "target": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", "targetHandle": "default", - "id": "reactflow__edge-EXTRACT_TRACE_MDO3xxx-6aa51ca4-4a08-4d49-92b9-80406957dc19default-LINE-2581565b-e52a-4beb-aea1-f316a9ff1544default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault" }, { - "source": "LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897", + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "sourceHandle": "default", - "target": "TEXT_VIEW-040c59d9-3254-4fe2-a135-1e07f4a02172", + "target": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897default-TEXT_VIEW-040c59d9-3254-4fe2-a135-1e07f4a02172default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault" }, { - "source": "LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897", + "source": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", "sourceHandle": "default", - "target": "EXTRACT_TRACE_MDO3xxx-ce7d1df1-2a6c-4be0-ba71-e5e0242fc0d0", - "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897default-EXTRACT_TRACE_MDO3xxx-ce7d1df1-2a6c-4be0-ba71-e5e0242fc0d0default" - }, - { - "source": "LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897", - "sourceHandle": "default", - "target": "EXTRACT_TRACE_MDO3xxx-6aa51ca4-4a08-4d49-92b9-80406957dc19", - "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-43fd688c-d384-475d-9022-b3de1a0c9897default-EXTRACT_TRACE_MDO3xxx-6aa51ca4-4a08-4d49-92b9-80406957dc19default" + "target": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "targetHandle": "primary_trace", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault-COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638primary_trace" }, { - "source": "EXTRACT_TRACE_MDO3xxx-ce7d1df1-2a6c-4be0-ba71-e5e0242fc0d0", + "source": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "sourceHandle": "default", - "target": "LINE-d04523ad-fd65-47b6-bbe3-ef5ec0836e24", - "targetHandle": "default", - "id": "reactflow__edge-EXTRACT_TRACE_MDO3xxx-ce7d1df1-2a6c-4be0-ba71-e5e0242fc0d0default-LINE-d04523ad-fd65-47b6-bbe3-ef5ec0836e24default" + "target": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "targetHandle": "secondary_trace", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault-COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638secondary_trace" } ], "viewport": { - "x": 855.945537953298, - "y": 287.6844024349923, - "zoom": 2 + "x": 1136.4492687849445, + "y": 584.5880790869217, + "zoom": 1.2397346348267997 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt index 7d3ab5adb..187455aa7 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/docstring.txt @@ -7,21 +7,16 @@ The MEASUREMENTS_MDO3XXX node extracts waveform measurements from an MDO3XXX osc Units are in seconds, Hz, and V for frequency, period, and amplitude respectively. - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): MDO4xxx, MSO4xxx, and DPO4xxx. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). measurement: str The measurement to extract from the scope. statistic: str diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt index 078695fc3..4287c3cbb 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,49 +1,18 @@ -from flojoy import flojoy, DataContainer, Scalar -import pyvisa +from flojoy import flojoy, DataContainer, Scalar, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def MEASUREMENTS_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, channel: int = 0, measurement: Literal["period", "frequency", "amplitude"] = "period", statistic: Literal["instant", "mean", "max", "min", "stdev"] = "instant", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> Scalar: - assert channel < num_channels, "Channel must be less than num_channels." - - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() tek.measurement[0].source1(f"CH{int(channel + 1)}") @@ -78,6 +47,4 @@ def MEASUREMENTS_MDO3XXX( unit = tek.measurement[0].amplitude.unit print(f"Amplitude of signal at channel {chan}: {value:.2E} {unit}") - tek.close() - return Scalar(c=value) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/examples/EX1/app.json index e735d4c9c..ef0e7db41 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/examples/EX1/app.json @@ -4,20 +4,66 @@ { "width": 380, "height": 293, - "id": "TABLE-8502d02c-02db-48a3-9f1c-0b4cf4dbbb60", + "id": "BIG_NUMBER-5f43d902-9dab-4087-91b3-f2f747153cba", "type": "VISUALIZERS", "data": { - "id": "TABLE-8502d02c-02db-48a3-9f1c-0b4cf4dbbb60", - "label": "TABLE", - "func": "TABLE", + "id": "BIG_NUMBER-5f43d902-9dab-4087-91b3-f2f747153cba", + "label": "BIG NUMBER", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "OrderedPair|Scalar|Vector", "multiple": false, "desc": "the DataContainer to be visualized" } @@ -27,99 +73,78 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 347.54588720662605, - "y": 123.25364834836444 + "x": 139.9514618834612, + "y": 856.9285489402928 }, "selected": false, "positionAbsolute": { - "x": 347.54588720662605, - "y": 123.25364834836444 + "x": 139.9514618834612, + "y": 856.9285489402928 }, "dragging": true }, { - "width": 192, - "height": 192, - "id": "MEASUREMENTS-013785cf-849c-4ab2-b49c-13bc537b6358", - "type": "IO", + "width": 380, + "height": 293, + "id": "BIG_NUMBER-03394363-cf62-4a83-90de-f100085dbad6", + "type": "VISUALIZERS", "data": { - "id": "MEASUREMENTS-013785cf-849c-4ab2-b49c-13bc537b6358", - "label": "Period (s)", - "func": "MEASUREMENTS", - "type": "IO", + "id": "BIG_NUMBER-03394363-cf62-4a83-90de-f100085dbad6", + "label": "BIG NUMBER 1", + "func": "BIG_NUMBER", + "type": "VISUALIZERS", "ctrls": { - "VISA_address": { + "suffix": { "type": "str", "default": null, - "desc": "The VISA address to query.", + "desc": "any suffix to show with big number", "overload": null, - "functionName": "MEASUREMENTS", - "param": "VISA_address", - "value": "USB0::1689::1032::C012101::0::INSTR" + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "MEASUREMENTS", - "param": "VISA_index", - "value": 2 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", "overload": null, - "functionName": "MEASUREMENTS", - "param": "num_channels", - "value": 2 + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" }, - "channel": { - "type": "int", - "default": 0, - "desc": null, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", "overload": null, - "functionName": "MEASUREMENTS", - "param": "channel", - "value": 0 + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" }, - "measurement": { - "type": "select", - "options": [ - "period", - "frequency", - "amplitude" - ], - "default": "period", - "desc": null, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", "overload": null, - "functionName": "MEASUREMENTS", - "param": "measurement", - "value": "period" + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true }, - "statistic": { - "type": "select", - "options": [ - "instant", - "mean", - "max", - "min", - "stdev" - ], - "default": "instant", + "scientific_notation": { + "type": "bool", + "default": false, "desc": null, "overload": null, - "functionName": "MEASUREMENTS", - "param": "statistic", - "value": "instant" + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": true } }, "initCtrls": {}, @@ -127,195 +152,210 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "OrderedPair|Scalar|Vector", "multiple": false, - "desc": null + "desc": "the DataContainer to be visualized" } ], "outputs": [ { "name": "default", "id": "default", - "type": "Any", - "desc": "OrderedPair: The trace of the oscilloscope is" - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" + "type": "Plotly", + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/MEASUREMENTS/MEASUREMENTS.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": -109.46719746069327, - "y": 174.47386316824287 + "x": 142.64868409751497, + "y": 486.1322678436319 }, "selected": false, "positionAbsolute": { - "x": -109.46719746069327, - "y": 174.47386316824287 + "x": 142.64868409751497, + "y": 486.1322678436319 }, "dragging": true }, { - "width": 192, - "height": 192, - "id": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", - "type": "IO", + "width": 380, + "height": 293, + "id": "BIG_NUMBER-1e0ca4d6-8af2-45e6-859d-aabc13acb074", + "type": "VISUALIZERS", "data": { - "id": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", - "label": "LIST VISA", - "func": "LIST_VISA", - "type": "IO", - "ctrls": {}, + "id": "BIG_NUMBER-1e0ca4d6-8af2-45e6-859d-aabc13acb074", + "label": "BIG NUMBER 2", + "func": "BIG_NUMBER", + "type": "VISUALIZERS", + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": true + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "Any", + "type": "OrderedPair|Scalar|Vector", "multiple": false, - "desc": null + "desc": "the DataContainer to be visualized" } ], "outputs": [ { "name": "default", "id": "default", - "type": "Any", - "desc": "optional: The input DataContainer is returned." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" + "type": "Plotly", + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": -723.0785771711177, - "y": 525.3171553398978 + "x": 142.51527037739385, + "y": 127.04830282930527 }, "selected": false, "positionAbsolute": { - "x": -723.0785771711177, - "y": 525.3171553398978 + "x": 142.51527037739385, + "y": 127.04830282930527 }, "dragging": true }, { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54", - "type": "VISUALIZERS", + "width": 192, + "height": 192, + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "type": "IO", "data": { - "id": "TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54", - "label": "TEXT VIEW", - "func": "TEXT_VIEW", - "type": "VISUALIZERS", - "ctrls": {}, + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", + "type": "IO", + "ctrls": { + "device": { + "type": "VisaDevice", + "default": null, + "desc": "The VISA address to connect to.", + "overload": null, + "functionName": "CONNECTION_MDO3XXX", + "param": "device", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "num_channels": { + "type": "int", + "default": 4, + "desc": "The number of channels on the instrument that are currently in use.", + "overload": null, + "functionName": "CONNECTION_MDO3XXX", + "param": "num_channels", + "value": 2 + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "TextBlob", + "type": "Any", "multiple": false, - "desc": "the DataContainer to be visualized in text format" + "desc": null } ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": "Optional: None" + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": -491.60761989584813, - "y": 84.43176657303763 + "x": -820.98108235832, + "y": 515.824408273644 }, "selected": false, "positionAbsolute": { - "x": -491.60761989584813, - "y": 84.43176657303763 + "x": -820.98108235832, + "y": 515.824408273644 }, "dragging": true }, { "width": 192, "height": 192, - "id": "MEASUREMENTS-5ad9069c-b442-4a09-9abe-8ac3dcec5257", + "id": "MEASUREMENTS_MDO3XXX-07126d17-0af6-4399-8c63-4bdee7cf7e7e", "type": "IO", "data": { - "id": "MEASUREMENTS-5ad9069c-b442-4a09-9abe-8ac3dcec5257", - "label": "Frequency (Hz)", - "func": "MEASUREMENTS", + "id": "MEASUREMENTS_MDO3XXX-07126d17-0af6-4399-8c63-4bdee7cf7e7e", + "label": "Amplitude (V)", + "func": "MEASUREMENTS_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "MEASUREMENTS", - "param": "VISA_address", + "functionName": "MEASUREMENTS_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "MEASUREMENTS", - "param": "VISA_index", - "value": 2 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "MEASUREMENTS", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, "desc": null, "overload": null, - "functionName": "MEASUREMENTS", + "functionName": "MEASUREMENTS_MDO3XXX", "param": "channel", "value": 0 }, @@ -327,11 +367,11 @@ "amplitude" ], "default": "period", - "desc": null, + "desc": "The measurement to extract from the scope.", "overload": null, - "functionName": "MEASUREMENTS", + "functionName": "MEASUREMENTS_MDO3XXX", "param": "measurement", - "value": "frequency" + "value": "amplitude" }, "statistic": { "type": "select", @@ -343,9 +383,9 @@ "stdev" ], "default": "instant", - "desc": null, + "desc": "The statistic mode to use for the measurement.", "overload": null, - "functionName": "MEASUREMENTS", + "functionName": "MEASUREMENTS_MDO3XXX", "param": "statistic", "value": "instant" } @@ -364,90 +404,50 @@ { "name": "default", "id": "default", - "type": "Any", - "desc": "OrderedPair: The trace of the oscilloscope is" + "type": "Scalar", + "desc": "Scalar: The waveform measurement in the selected statistic mode." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/MEASUREMENTS/MEASUREMENTS.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/MEASUREMENTS_MDO3XXX.py", "selected": false }, "position": { - "x": -107.02353009775844, - "y": 521.6491370830611 + "x": -287.36853280155697, + "y": 871.023083353902 }, "selected": false, "positionAbsolute": { - "x": -107.02353009775844, - "y": 521.6491370830611 + "x": -287.36853280155697, + "y": 871.023083353902 }, "dragging": true }, { "width": 192, "height": 192, - "id": "MEASUREMENTS-3964efd7-ca85-4764-af76-12a1c653a66a", + "id": "MEASUREMENTS_MDO3XXX-d5593414-b4b5-4247-b5fb-881e4f4685b2", "type": "IO", "data": { - "id": "MEASUREMENTS-3964efd7-ca85-4764-af76-12a1c653a66a", - "label": "Amplitude (V)", - "func": "MEASUREMENTS", + "id": "MEASUREMENTS_MDO3XXX-d5593414-b4b5-4247-b5fb-881e4f4685b2", + "label": "Period (s)", + "func": "MEASUREMENTS_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "MEASUREMENTS", - "param": "VISA_address", + "functionName": "MEASUREMENTS_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "MEASUREMENTS", - "param": "VISA_index", - "value": 2 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "MEASUREMENTS", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, "desc": null, "overload": null, - "functionName": "MEASUREMENTS", + "functionName": "MEASUREMENTS_MDO3XXX", "param": "channel", "value": 0 }, @@ -459,11 +459,11 @@ "amplitude" ], "default": "period", - "desc": null, + "desc": "The measurement to extract from the scope.", "overload": null, - "functionName": "MEASUREMENTS", + "functionName": "MEASUREMENTS_MDO3XXX", "param": "measurement", - "value": "amplitude" + "value": "period" }, "statistic": { "type": "select", @@ -475,9 +475,9 @@ "stdev" ], "default": "instant", - "desc": null, + "desc": "The statistic mode to use for the measurement.", "overload": null, - "functionName": "MEASUREMENTS", + "functionName": "MEASUREMENTS_MDO3XXX", "param": "statistic", "value": "instant" } @@ -496,182 +496,159 @@ { "name": "default", "id": "default", - "type": "Any", - "desc": "OrderedPair: The trace of the oscilloscope is" - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" + "type": "Scalar", + "desc": "Scalar: The waveform measurement in the selected statistic mode." } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/MEASUREMENTS/MEASUREMENTS.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/MEASUREMENTS_MDO3XXX.py", "selected": false }, "position": { - "x": -105.29299884901738, - "y": 841.8596668182389 + "x": -271.27162271828524, + "y": 139.4321283272837 }, "selected": false, "positionAbsolute": { - "x": -105.29299884901738, - "y": 841.8596668182389 + "x": -271.27162271828524, + "y": 139.4321283272837 }, "dragging": true }, { - "width": 380, - "height": 293, - "id": "TABLE-a633b933-f81f-47fd-9a4f-2fd5b91457ed", - "type": "VISUALIZERS", + "width": 192, + "height": 192, + "id": "MEASUREMENTS_MDO3XXX-41288d34-10df-491e-9f19-f593e40fd299", + "type": "IO", "data": { - "id": "TABLE-a633b933-f81f-47fd-9a4f-2fd5b91457ed", - "label": "TABLE 1", - "func": "TABLE", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", - "multiple": false, - "desc": "the DataContainer to be visualized" - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "id": "MEASUREMENTS_MDO3XXX-41288d34-10df-491e-9f19-f593e40fd299", + "label": "Frequency (Hz)", + "func": "MEASUREMENTS_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "MEASUREMENTS_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "channel": { + "type": "int", + "default": 0, + "desc": null, + "overload": null, + "functionName": "MEASUREMENTS_MDO3XXX", + "param": "channel", + "value": 0 + }, + "measurement": { + "type": "select", + "options": [ + "period", + "frequency", + "amplitude" + ], + "default": "period", + "desc": "The measurement to extract from the scope.", + "overload": null, + "functionName": "MEASUREMENTS_MDO3XXX", + "param": "measurement", + "value": "frequency" + }, + "statistic": { + "type": "select", + "options": [ + "instant", + "mean", + "max", + "min", + "stdev" + ], + "default": "instant", + "desc": "The statistic mode to use for the measurement.", + "overload": null, + "functionName": "MEASUREMENTS_MDO3XXX", + "param": "statistic", + "value": "instant" } - ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", - "selected": false - }, - "position": { - "x": 364.79429784050353, - "y": 794.2463242591917 - }, - "selected": false, - "positionAbsolute": { - "x": 364.79429784050353, - "y": 794.2463242591917 - }, - "dragging": true - }, - { - "width": 380, - "height": 293, - "id": "TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053", - "type": "VISUALIZERS", - "data": { - "id": "TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053", - "label": "TABLE 2", - "func": "TABLE", - "type": "VISUALIZERS", - "ctrls": {}, + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "Any", "multiple": false, - "desc": "the DataContainer to be visualized" + "desc": null } ], "outputs": [ { "name": "default", "id": "default", - "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "type": "Scalar", + "desc": "Scalar: The waveform measurement in the selected statistic mode." } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/MEASUREMENTS_MDO3XXX.py", "selected": false }, "position": { - "x": 350.9143300314926, - "y": 473.05392404199927 + "x": -283.8564567007129, + "y": 508.34643183352273 }, "selected": false, "positionAbsolute": { - "x": 350.9143300314926, - "y": 473.05392404199927 + "x": -283.8564567007129, + "y": 508.34643183352273 }, "dragging": true } ], "edges": [ { - "source": "MEASUREMENTS-013785cf-849c-4ab2-b49c-13bc537b6358", - "sourceHandle": "default", - "target": "TABLE-8502d02c-02db-48a3-9f1c-0b4cf4dbbb60", - "targetHandle": "default", - "id": "reactflow__edge-MEASUREMENTS-013785cf-849c-4ab2-b49c-13bc537b6358default-TABLE-8502d02c-02db-48a3-9f1c-0b4cf4dbbb60default" - }, - { - "source": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "source": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "sourceHandle": "default", - "target": "TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54", + "target": "MEASUREMENTS_MDO3XXX-41288d34-10df-491e-9f19-f593e40fd299", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60default-TEXT_VIEW-9ba0951f-eb88-420e-9389-7145697c1f54default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56default-MEASUREMENTS_MDO3XXX-41288d34-10df-491e-9f19-f593e40fd299default" }, { - "source": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "source": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "sourceHandle": "default", - "target": "MEASUREMENTS-013785cf-849c-4ab2-b49c-13bc537b6358", + "target": "MEASUREMENTS_MDO3XXX-d5593414-b4b5-4247-b5fb-881e4f4685b2", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60default-MEASUREMENTS-013785cf-849c-4ab2-b49c-13bc537b6358default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56default-MEASUREMENTS_MDO3XXX-d5593414-b4b5-4247-b5fb-881e4f4685b2default" }, { - "source": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "source": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "sourceHandle": "default", - "target": "MEASUREMENTS-5ad9069c-b442-4a09-9abe-8ac3dcec5257", + "target": "MEASUREMENTS_MDO3XXX-07126d17-0af6-4399-8c63-4bdee7cf7e7e", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60default-MEASUREMENTS-5ad9069c-b442-4a09-9abe-8ac3dcec5257default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56default-MEASUREMENTS_MDO3XXX-07126d17-0af6-4399-8c63-4bdee7cf7e7edefault" }, { - "source": "LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60", + "source": "MEASUREMENTS_MDO3XXX-07126d17-0af6-4399-8c63-4bdee7cf7e7e", "sourceHandle": "default", - "target": "MEASUREMENTS-3964efd7-ca85-4764-af76-12a1c653a66a", + "target": "BIG_NUMBER-5f43d902-9dab-4087-91b3-f2f747153cba", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-789bdf25-9c0d-45e4-ab76-bda6e68fec60default-MEASUREMENTS-3964efd7-ca85-4764-af76-12a1c653a66adefault" + "id": "reactflow__edge-MEASUREMENTS_MDO3XXX-07126d17-0af6-4399-8c63-4bdee7cf7e7edefault-BIG_NUMBER-5f43d902-9dab-4087-91b3-f2f747153cbadefault" }, { - "source": "MEASUREMENTS-3964efd7-ca85-4764-af76-12a1c653a66a", + "source": "MEASUREMENTS_MDO3XXX-41288d34-10df-491e-9f19-f593e40fd299", "sourceHandle": "default", - "target": "TABLE-a633b933-f81f-47fd-9a4f-2fd5b91457ed", + "target": "BIG_NUMBER-03394363-cf62-4a83-90de-f100085dbad6", "targetHandle": "default", - "id": "reactflow__edge-MEASUREMENTS-3964efd7-ca85-4764-af76-12a1c653a66adefault-TABLE-a633b933-f81f-47fd-9a4f-2fd5b91457eddefault" + "id": "reactflow__edge-MEASUREMENTS_MDO3XXX-41288d34-10df-491e-9f19-f593e40fd299default-BIG_NUMBER-03394363-cf62-4a83-90de-f100085dbad6default" }, { - "source": "MEASUREMENTS-5ad9069c-b442-4a09-9abe-8ac3dcec5257", + "source": "MEASUREMENTS_MDO3XXX-d5593414-b4b5-4247-b5fb-881e4f4685b2", "sourceHandle": "default", - "target": "TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053", + "target": "BIG_NUMBER-1e0ca4d6-8af2-45e6-859d-aabc13acb074", "targetHandle": "default", - "id": "reactflow__edge-MEASUREMENTS-5ad9069c-b442-4a09-9abe-8ac3dcec5257default-TABLE-eefc79f6-ada6-4b36-ab8c-38c5b61cd053default" + "id": "reactflow__edge-MEASUREMENTS_MDO3XXX-d5593414-b4b5-4247-b5fb-881e4f4685b2default-BIG_NUMBER-1e0ca4d6-8af2-45e6-859d-aabc13acb074default" } ], "viewport": { diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/docstring.txt index 76bd22b9d..335a0b50c 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/docstring.txt @@ -1,20 +1,15 @@ The MEASURE_PHASE_MDO3XXX node measures the phase between two channels. - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): MDO4xxx, MSO4xxx, and DPO4xxx. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). channel1: int The first channel. channel2: int diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/python_code.txt index a0f711c2e..51abaa52c 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,53 +1,22 @@ -from flojoy import flojoy, DataContainer, Scalar -import pyvisa -from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError +from flojoy import flojoy, DataContainer, Scalar, VisaConnection +from typing import Optional -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def MEASURE_PHASE_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, channel1: int = 0, channel2: int = 1, default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> Scalar: assert channel1 != channel2, "The channels must not the same." - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() tek.measurement[0].source1(f"CH{int(channel1 + 1)}") tek.measurement[0].source2(f"CH{int(channel2 + 1)}") value = tek.measurement[0].phase() - tek.close() - return Scalar(c=value) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/examples/EX1/app.json index d73e89ede..76e62ddda 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/examples/EX1/app.json @@ -4,58 +4,31 @@ { "width": 192, "height": 192, - "id": "MEASURE_PHASE_MDO3xxx-3be6aedd-2269-4b55-adcc-87cf297cfdc4", + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "type": "IO", "data": { - "id": "MEASURE_PHASE_MDO3xxx-3be6aedd-2269-4b55-adcc-87cf297cfdc4", - "label": "MEASURE PHASE MDO3xxx", - "func": "MEASURE_PHASE_MDO3xxx", + "id": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "device": { + "type": "VisaDevice", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address to connect to.", "overload": null, - "functionName": "MEASURE_PHASE_MDO3xxx", - "param": "VISA_address", + "functionName": "CONNECTION_MDO3XXX", + "param": "device", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "MEASURE_PHASE_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, "num_channels": { "type": "int", "default": 4, "desc": "The number of channels on the instrument that are currently in use.", "overload": null, - "functionName": "MEASURE_PHASE_MDO3xxx", + "functionName": "CONNECTION_MDO3XXX", "param": "num_channels", "value": 2 - }, - "channel1": { - "type": "int", - "default": 0, - "desc": "The first channel.", - "overload": null, - "functionName": "MEASURE_PHASE_MDO3xxx", - "param": "channel1", - "value": 0 - }, - "channel2": { - "type": "int", - "default": 1, - "desc": "The second channel.", - "overload": null, - "functionName": "MEASURE_PHASE_MDO3xxx", - "param": "channel2", - "value": 1 } }, "initCtrls": {}, @@ -73,132 +46,49 @@ "name": "default", "id": "default", "type": "Any", - "desc": "Scalar: The phase between the two channels." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" + "desc": "Optional: None" } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/MEASURE_PHASE_MDO3xxx/MEASURE_PHASE_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": -146.94504189289654, - "y": -138.10351810131488 + "x": -255.44879430712533, + "y": -98.564770643341 }, "selected": false, "positionAbsolute": { - "x": -146.94504189289654, - "y": -138.10351810131488 - }, - "dragging": true - }, - { - "width": 380, - "height": 293, - "id": "TABLE-710f7624-23ea-4cb3-b7df-63cd5fae8344", - "type": "VISUALIZERS", - "data": { - "id": "TABLE-710f7624-23ea-4cb3-b7df-63cd5fae8344", - "label": "TABLE", - "func": "TABLE", - "type": "VISUALIZERS", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", - "multiple": false, - "desc": "the DataContainer to be visualized" - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" - } - ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", - "selected": false - }, - "position": { - "x": 222.50359203679318, - "y": -182.86020845531098 - }, - "selected": false, - "positionAbsolute": { - "x": 222.50359203679318, - "y": -182.86020845531098 + "x": -255.44879430712533, + "y": -98.564770643341 }, "dragging": true }, { "width": 192, "height": 192, - "id": "EXTRACT_TRACE_MDO3xxx-7cb94424-b410-48fe-8801-16875e59ab33", + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", "type": "IO", "data": { - "id": "EXTRACT_TRACE_MDO3xxx-7cb94424-b410-48fe-8801-16875e59ab33", - "label": "EXTRACT TRACE MDO3xxx", - "func": "EXTRACT_TRACE_MDO3xxx", + "id": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", + "label": "EXTRACT TRACE CH1", + "func": "EXTRACT_TRACE_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_address", + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, "desc": null, "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "channel", "value": 0 }, @@ -207,7 +97,7 @@ "default": 5000, "desc": "The length of the trace to extract.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "x_length", "value": 1000 }, @@ -220,7 +110,7 @@ "default": "pixels", "desc": "The units of the length specified in x_length: nanoseconds or pixels.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "length_type", "value": "nanoseconds" } @@ -239,90 +129,50 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "OrderedPair", "desc": "OrderedPair: The trace of the oscilloscope is returned." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/EXTRACT_TRACE_MDO3xxx/EXTRACT_TRACE_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", "selected": false }, "position": { - "x": -544.9773918631628, - "y": -495.41393710471084 + "x": 113.84773865986861, + "y": -250.27104415997167 }, "selected": false, "positionAbsolute": { - "x": -544.9773918631628, - "y": -495.41393710471084 + "x": 113.84773865986861, + "y": -250.27104415997167 }, "dragging": true }, { "width": 192, "height": 192, - "id": "EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496", + "id": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "type": "IO", "data": { - "id": "EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496", - "label": "EXTRACT TRACE MDO3xxx 1", - "func": "EXTRACT_TRACE_MDO3xxx", + "id": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", + "label": "EXTRACT TRACE CH2", + "func": "EXTRACT_TRACE_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_address", + "functionName": "EXTRACT_TRACE_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, "desc": null, "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "channel", "value": 1 }, @@ -331,9 +181,9 @@ "default": 5000, "desc": "The length of the trace to extract.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "x_length", - "value": 1000 + "value": 2500 }, "length_type": { "type": "select", @@ -344,9 +194,9 @@ "default": "pixels", "desc": "The units of the length specified in x_length: nanoseconds or pixels.", "overload": null, - "functionName": "EXTRACT_TRACE_MDO3xxx", + "functionName": "EXTRACT_TRACE_MDO3XXX", "param": "length_type", - "value": "nanoseconds" + "value": "pixels" } }, "initCtrls": {}, @@ -363,102 +213,31 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "OrderedPair", "desc": "OrderedPair: The trace of the oscilloscope is returned." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/EXTRACT_TRACE_MDO3xxx/EXTRACT_TRACE_MDO3xxx.py", - "selected": false - }, - "position": { - "x": -540.3639098715225, - "y": -142.35021160957592 - }, - "selected": false, - "positionAbsolute": { - "x": -540.3639098715225, - "y": -142.35021160957592 - }, - "dragging": true - }, - { - "width": 192, - "height": 192, - "id": "CLOSE_ALL-7334967e-96fc-4dfd-ad5b-7056d23c5a0e", - "type": "IO", - "data": { - "id": "CLOSE_ALL-7334967e-96fc-4dfd-ad5b-7056d23c5a0e", - "label": "CLOSE ALL", - "func": "CLOSE_ALL", - "type": "IO", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "Any", - "multiple": false, - "desc": null - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Any", - "desc": "optional: The input DataContainer is returned." - } - ], - "pip_dependencies": [ - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/QCODES/CLOSE_ALL/CLOSE_ALL.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX.py", "selected": false }, "position": { - "x": -946.3627341334177, - "y": -245.60062718347706 + "x": 111.1114171685565, + "y": 67.69996146361609 }, "selected": false, "positionAbsolute": { - "x": -946.3627341334177, - "y": -245.60062718347706 + "x": 111.1114171685565, + "y": 67.69996146361609 }, "dragging": true }, { "width": 380, "height": 293, - "id": "COMPOSITE-706a3e88-dedb-4f32-8307-46c5aaddc8c0", + "id": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", "type": "VISUALIZERS", "data": { - "id": "COMPOSITE-706a3e88-dedb-4f32-8307-46c5aaddc8c0", + "id": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", "label": "COMPOSITE", "func": "COMPOSITE", "type": "VISUALIZERS", @@ -523,65 +302,225 @@ "selected": false }, "position": { - "x": -135.13323675148646, - "y": -514.9178936918959 + "x": 509.80416648797427, + "y": -265.5990478765916 + }, + "selected": false, + "positionAbsolute": { + "x": 509.80416648797427, + "y": -265.5990478765916 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "MEASURE_PHASE_MDO3XXX-7aead8ab-746b-48f4-a737-187fa191f880", + "type": "IO", + "data": { + "id": "MEASURE_PHASE_MDO3XXX-7aead8ab-746b-48f4-a737-187fa191f880", + "label": "MEASURE PHASE MDO3XXX", + "func": "MEASURE_PHASE_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "MEASURE_PHASE_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" + }, + "channel1": { + "type": "int", + "default": 0, + "desc": "The first channel.", + "overload": null, + "functionName": "MEASURE_PHASE_MDO3XXX", + "param": "channel1", + "value": 1 + }, + "channel2": { + "type": "int", + "default": 1, + "desc": "The second channel.", + "overload": null, + "functionName": "MEASURE_PHASE_MDO3XXX", + "param": "channel2", + "value": 0 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Scalar", + "desc": "Scalar: The phase between the two channels." + } + ], + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/MEASURE_PHASE_MDO3XXX.py", + "selected": false + }, + "position": { + "x": 514.1639995494402, + "y": 67.59886572194358 + }, + "selected": false, + "positionAbsolute": { + "x": 514.1639995494402, + "y": 67.59886572194358 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35", + "type": "VISUALIZERS", + "data": { + "id": "BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35", + "label": "BIG NUMBER", + "func": "BIG_NUMBER", + "type": "VISUALIZERS", + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|Scalar|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing the Plotly big number visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", + "selected": false + }, + "position": { + "x": 845.5374185179943, + "y": 55.427074582262264 }, "selected": false, "positionAbsolute": { - "x": -135.13323675148646, - "y": -514.9178936918959 + "x": 845.5374185179943, + "y": 55.427074582262264 }, "dragging": true } ], "edges": [ { - "source": "MEASURE_PHASE_MDO3xxx-3be6aedd-2269-4b55-adcc-87cf297cfdc4", + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "sourceHandle": "default", - "target": "TABLE-710f7624-23ea-4cb3-b7df-63cd5fae8344", + "target": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", "targetHandle": "default", - "id": "reactflow__edge-MEASURE_PHASE_MDO3xxx-3be6aedd-2269-4b55-adcc-87cf297cfdc4default-TABLE-710f7624-23ea-4cb3-b7df-63cd5fae8344default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault" }, { - "source": "CLOSE_ALL-7334967e-96fc-4dfd-ad5b-7056d23c5a0e", + "source": "CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3", "sourceHandle": "default", - "target": "EXTRACT_TRACE_MDO3xxx-7cb94424-b410-48fe-8801-16875e59ab33", + "target": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "targetHandle": "default", - "id": "reactflow__edge-CLOSE_ALL-7334967e-96fc-4dfd-ad5b-7056d23c5a0edefault-EXTRACT_TRACE_MDO3xxx-7cb94424-b410-48fe-8801-16875e59ab33default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-9ce85b60-e790-43df-bb20-2d71fda6c1b3default-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault" }, { - "source": "CLOSE_ALL-7334967e-96fc-4dfd-ad5b-7056d23c5a0e", + "source": "EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975f", "sourceHandle": "default", - "target": "EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496", - "targetHandle": "default", - "id": "reactflow__edge-CLOSE_ALL-7334967e-96fc-4dfd-ad5b-7056d23c5a0edefault-EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496default" + "target": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "targetHandle": "primary_trace", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-c47a35fb-de9e-404b-84e6-223f569e975fdefault-COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638primary_trace" }, { - "source": "EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496", + "source": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "sourceHandle": "default", - "target": "MEASURE_PHASE_MDO3xxx-3be6aedd-2269-4b55-adcc-87cf297cfdc4", - "targetHandle": "default", - "id": "reactflow__edge-EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496default-MEASURE_PHASE_MDO3xxx-3be6aedd-2269-4b55-adcc-87cf297cfdc4default" + "target": "COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638", + "targetHandle": "secondary_trace", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault-COMPOSITE-5248f5d5-8e45-4b9b-9bf3-d16bda395638secondary_trace" }, { - "source": "EXTRACT_TRACE_MDO3xxx-7cb94424-b410-48fe-8801-16875e59ab33", + "source": "EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285c", "sourceHandle": "default", - "target": "COMPOSITE-706a3e88-dedb-4f32-8307-46c5aaddc8c0", - "targetHandle": "primary_trace", - "id": "reactflow__edge-EXTRACT_TRACE_MDO3xxx-7cb94424-b410-48fe-8801-16875e59ab33default-COMPOSITE-706a3e88-dedb-4f32-8307-46c5aaddc8c0primary_trace" + "target": "MEASURE_PHASE_MDO3XXX-7aead8ab-746b-48f4-a737-187fa191f880", + "targetHandle": "default", + "id": "reactflow__edge-EXTRACT_TRACE_MDO3XXX-ae2c4d4c-59d2-4262-8817-0589e25c285cdefault-MEASURE_PHASE_MDO3XXX-7aead8ab-746b-48f4-a737-187fa191f880default" }, { - "source": "EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496", + "source": "MEASURE_PHASE_MDO3XXX-7aead8ab-746b-48f4-a737-187fa191f880", "sourceHandle": "default", - "target": "COMPOSITE-706a3e88-dedb-4f32-8307-46c5aaddc8c0", - "targetHandle": "secondary_trace", - "id": "reactflow__edge-EXTRACT_TRACE_MDO3xxx-f06cac58-5342-4720-9a19-4daecc6ef496default-COMPOSITE-706a3e88-dedb-4f32-8307-46c5aaddc8c0secondary_trace" + "target": "BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35", + "targetHandle": "default", + "id": "reactflow__edge-MEASURE_PHASE_MDO3XXX-7aead8ab-746b-48f4-a737-187fa191f880default-BIG_NUMBER-cc9b6db5-08dd-4f8a-8256-6fcb30a02b35default" } ], "viewport": { - "x": 1104.261946392206, - "y": 573.1338859553202, - "zoom": 1.2154437530123414 + "x": 1136.4492687849445, + "y": 584.5880790869217, + "zoom": 1.2397346348267997 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/docstring.txt index b880e9877..5137138f9 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/docstring.txt @@ -4,7 +4,6 @@ The TERMINATION_MDO3XXX node sets the termination ohms (or queries it). in the oscilloscope must match that value. Note that the termination is often called the "electrical impedance". - Note that the 75 Ohm option is not compatible with all model numbers. If the "VISA_address" parameter is not specified the VISA_index will be @@ -16,12 +15,8 @@ The TERMINATION_MDO3XXX node sets the termination ohms (or queries it). Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). channel: int The channel to query or set the impedance/termination. termination: str @@ -32,4 +27,4 @@ The TERMINATION_MDO3XXX node sets the termination ohms (or queries it). Returns ------- DataContainer - Scalar: The triggering voltage. + Scalar: The termination value for the chosen channel. diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/python_code.txt index c5e6a0bde..fa86ae9a8 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,47 +1,18 @@ -from flojoy import flojoy, DataContainer, Scalar -import pyvisa +from flojoy import flojoy, DataContainer, Scalar, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def TERMINATION_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, channel: int = 0, termination: Literal["50 ohm", "75 ohm", "1M ohm"] = "50 ohm", query_set: Literal["query", "set"] = "query", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> Scalar: - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() match termination: case "50 ohm": @@ -58,6 +29,4 @@ def TERMINATION_MDO3XXX( tek.channel[int(channel)].termination(termination) c = termination - tek.close() - return Scalar(c=c) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/examples/EX1/app.json index 3c50286a0..9db0ff049 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/examples/EX1/app.json @@ -4,76 +4,31 @@ { "width": 192, "height": 192, - "id": "TERMINATION_MDO3xxx-64e0ba45-b631-44d3-9058-f48730b6529e", + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "type": "IO", "data": { - "id": "TERMINATION_MDO3xxx-64e0ba45-b631-44d3-9058-f48730b6529e", - "label": "TERMINATION SET CH1", - "func": "TERMINATION_MDO3xxx", + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "device": { + "type": "VisaDevice", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address to connect to.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_address", + "functionName": "CONNECTION_MDO3XXX", + "param": "device", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, "num_channels": { "type": "int", "default": 4, "desc": "The number of channels on the instrument that are currently in use.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "CONNECTION_MDO3XXX", "param": "num_channels", "value": 2 - }, - "channel": { - "type": "int", - "default": 0, - "desc": "The channel to query or set the impedance/termination.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "channel", - "value": 0 - }, - "termination": { - "type": "select", - "options": [ - "50 ohm", - "75 ohm", - "1M ohm" - ], - "default": "50 ohm", - "desc": "The ohm to which the termination impedance is set to.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "termination", - "value": "50 ohm" - }, - "query_set": { - "type": "select", - "options": [ - "query", - "set" - ], - "default": "query", - "desc": "Whether to query or set the triggering voltage.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "query_set", - "value": "set" } }, "initCtrls": {}, @@ -91,106 +46,52 @@ "name": "default", "id": "default", "type": "Any", - "desc": "Scalar: The triggering voltage." + "desc": "Optional: None" } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TERMINATION_MDO3xxx/TERMINATION_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": -308.05030342120835, - "y": -187.2168305343797 + "x": -938.6144043410202, + "y": 470.49780714269536 }, "selected": false, "positionAbsolute": { - "x": -308.05030342120835, - "y": -187.2168305343797 + "x": -938.6144043410202, + "y": 470.49780714269536 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TERMINATION_MDO3xxx-d846507e-deb8-4383-b5d5-af3e210d0b63", + "id": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "type": "IO", "data": { - "id": "TERMINATION_MDO3xxx-d846507e-deb8-4383-b5d5-af3e210d0b63", - "label": "TERMINATION QUERY CH1", - "func": "TERMINATION_MDO3xxx", + "id": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", + "label": "TRIGGER CHANNEL MDO3XXX", + "func": "TRIGGER_CHANNEL_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, - "desc": "The channel to query or set the impedance/termination.", + "desc": "The channel to set as the triggering channel (used if set=True).", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", "param": "channel", "value": 0 }, - "termination": { - "type": "select", - "options": [ - "50 ohm", - "75 ohm", - "1M ohm" - ], - "default": "50 ohm", - "desc": "The ohm to which the termination impedance is set to.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "termination", - "value": "50 ohm" - }, "query_set": { "type": "select", "options": [ @@ -198,9 +99,9 @@ "set" ], "default": "query", - "desc": "Whether to query or set the triggering voltage.", + "desc": "Whether to query or set the triggering channel.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", "param": "query_set", "value": "query" } @@ -219,106 +120,52 @@ { "name": "default", "id": "default", - "type": "Any", - "desc": "Scalar: The triggering voltage." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" + "type": "TextBlob", + "desc": "TextBlob: The triggering channel (e.g. CH1)." } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TERMINATION_MDO3xxx/TERMINATION_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/TRIGGER_CHANNEL_MDO3XXX.py", "selected": false }, "position": { - "x": 99.90006716206537, - "y": -186.12775937126906 + "x": -570.9525773294033, + "y": 466.494436792541 }, "selected": false, "positionAbsolute": { - "x": 99.90006716206537, - "y": -186.12775937126906 + "x": -570.9525773294033, + "y": 466.494436792541 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TERMINATION_MDO3xxx-d18522d8-39d9-481b-a4a9-8cc2c506b123", + "id": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "type": "IO", "data": { - "id": "TERMINATION_MDO3xxx-d18522d8-39d9-481b-a4a9-8cc2c506b123", - "label": "TERMINATION QUERY CH2", - "func": "TERMINATION_MDO3xxx", + "id": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", + "label": "TRIGGER LEVEL MDO3XXX", + "func": "TRIGGER_LEVEL_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_LEVEL_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "num_channels", - "value": 2 - }, - "channel": { - "type": "int", - "default": 0, - "desc": "The channel to query or set the impedance/termination.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "channel", - "value": 1 - }, - "termination": { - "type": "select", - "options": [ - "50 ohm", - "75 ohm", - "1M ohm" - ], - "default": "50 ohm", - "desc": "The ohm to which the termination impedance is set to.", + "trigger_volts": { + "type": "float", + "default": 0.1, + "desc": "The voltage to set the triggering level to.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "termination", - "value": "50 ohm" + "functionName": "TRIGGER_LEVEL_MDO3XXX", + "param": "trigger_volts", + "value": 0.1 }, "query_set": { "type": "select", @@ -329,7 +176,7 @@ "default": "query", "desc": "Whether to query or set the triggering voltage.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "TRIGGER_LEVEL_MDO3XXX", "param": "query_set", "value": "query" } @@ -348,92 +195,52 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "Scalar", "desc": "Scalar: The triggering voltage." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TERMINATION_MDO3xxx/TERMINATION_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/TRIGGER_LEVEL_MDO3XXX.py", "selected": false }, "position": { - "x": 120.58094042405847, - "y": 353.9695961217834 + "x": 149.8114874246843, + "y": 479.5869710079853 }, "selected": false, "positionAbsolute": { - "x": 120.58094042405847, - "y": 353.9695961217834 + "x": 149.8114874246843, + "y": 479.5869710079853 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TERMINATION_MDO3xxx-310eb275-188f-41fe-91b9-7d0345e45be6", + "id": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "type": "IO", "data": { - "id": "TERMINATION_MDO3xxx-310eb275-188f-41fe-91b9-7d0345e45be6", - "label": "TERMINATION SET CH2", - "func": "TERMINATION_MDO3xxx", + "id": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", + "label": "TERMINATION MDO3XXX", + "func": "TERMINATION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_address", + "functionName": "TERMINATION_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TERMINATION_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, "desc": "The channel to query or set the impedance/termination.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "TERMINATION_MDO3XXX", "param": "channel", - "value": 1 + "value": 0 }, "termination": { "type": "select", @@ -445,7 +252,7 @@ "default": "50 ohm", "desc": "The ohm to which the termination impedance is set to.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "TERMINATION_MDO3XXX", "param": "termination", "value": "50 ohm" }, @@ -458,9 +265,9 @@ "default": "query", "desc": "Whether to query or set the triggering voltage.", "overload": null, - "functionName": "TERMINATION_MDO3xxx", + "functionName": "TERMINATION_MDO3XXX", "param": "query_set", - "value": "set" + "value": "query" } }, "initCtrls": {}, @@ -477,114 +284,31 @@ { "name": "default", "id": "default", - "type": "Any", - "desc": "Scalar: The triggering voltage." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" + "type": "Scalar", + "desc": "Scalar: The termination value for the chosen channel." } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TERMINATION_MDO3xxx/TERMINATION_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/TERMINATION_MDO3XXX.py", "selected": false }, "position": { - "x": -308.89766443152814, - "y": 354.5928436998058 + "x": -208.52964407405477, + "y": 477.0224555404336 }, "selected": false, "positionAbsolute": { - "x": -308.89766443152814, - "y": 354.5928436998058 - }, - "dragging": true - }, - { - "width": 192, - "height": 192, - "id": "LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943f", - "type": "IO", - "data": { - "id": "LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943f", - "label": "LIST VISA", - "func": "LIST_VISA", - "type": "IO", - "ctrls": {}, - "initCtrls": {}, - "inputs": [ - { - "name": "default", - "id": "default", - "type": "Any", - "multiple": false, - "desc": null - } - ], - "outputs": [ - { - "name": "default", - "id": "default", - "type": "Any", - "desc": "optional: The input DataContainer is returned." - } - ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - } - ], - "path": "IO/INSTRUMENTS/QCODES/LIST_VISA/LIST_VISA.py", - "selected": false - }, - "position": { - "x": -679.8695460983985, - "y": 102.74467932523754 - }, - "selected": false, - "positionAbsolute": { - "x": -679.8695460983985, - "y": 102.74467932523754 + "x": -208.52964407405477, + "y": 477.0224555404336 }, "dragging": true }, { "width": 384, "height": 288, - "id": "TEXT_VIEW-59f945a8-8c5f-408b-9530-8709fd9aca2c", + "id": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "type": "VISUALIZERS", "data": { - "id": "TEXT_VIEW-59f945a8-8c5f-408b-9530-8709fd9aca2c", + "id": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "label": "TEXT VIEW", "func": "TEXT_VIEW", "type": "VISUALIZERS", @@ -603,33 +327,79 @@ "selected": false }, "position": { - "x": -320.86469014682496, - "y": 82.4269153738561 + "x": -236.5887560458949, + "y": 214.9500448205381 }, "selected": false, "positionAbsolute": { - "x": -320.86469014682496, - "y": 82.4269153738561 + "x": -236.5887560458949, + "y": 214.9500448205381 }, "dragging": true }, { "width": 380, "height": 293, - "id": "TABLE-45546c75-9924-4cd0-a9b8-6ed51aad0b63", + "id": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", "type": "VISUALIZERS", "data": { - "id": "TABLE-45546c75-9924-4cd0-a9b8-6ed51aad0b63", - "label": "TABLE", - "func": "TABLE", + "id": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", + "label": "BIG NUMBER", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "OrderedPair|Scalar|Vector", "multiple": false, "desc": "the DataContainer to be visualized" } @@ -639,40 +409,86 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 460.0659155916056, - "y": 303.63682497619874 + "x": 123.40424633518722, + "y": 702.8387346964474 }, "selected": false, "positionAbsolute": { - "x": 460.0659155916056, - "y": 303.63682497619874 + "x": 123.40424633518722, + "y": 702.8387346964474 }, "dragging": true }, { "width": 380, "height": 293, - "id": "TABLE-3178a537-1e33-40e1-8c49-dc52119491e5", + "id": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", "type": "VISUALIZERS", "data": { - "id": "TABLE-3178a537-1e33-40e1-8c49-dc52119491e5", - "label": "TABLE 1", - "func": "TABLE", + "id": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", + "label": "BIG NUMBER 1", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "OrderedPair|Scalar|Vector", "multiple": false, "desc": "the DataContainer to be visualized" } @@ -682,79 +498,72 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 441.9533828849556, - "y": -236.00122098015743 + "x": 484.61744162067066, + "y": 463.62850205243456 }, "selected": false, "positionAbsolute": { - "x": 441.9533828849556, - "y": -236.00122098015743 + "x": 484.61744162067066, + "y": 463.62850205243456 }, "dragging": true } ], "edges": [ { - "source": "LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943f", - "sourceHandle": "default", - "target": "TERMINATION_MDO3xxx-64e0ba45-b631-44d3-9058-f48730b6529e", - "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943fdefault-TERMINATION_MDO3xxx-64e0ba45-b631-44d3-9058-f48730b6529edefault" - }, - { - "source": "LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943f", + "source": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "sourceHandle": "default", - "target": "TERMINATION_MDO3xxx-310eb275-188f-41fe-91b9-7d0345e45be6", + "target": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943fdefault-TERMINATION_MDO3xxx-310eb275-188f-41fe-91b9-7d0345e45be6default" + "id": "reactflow__edge-CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56default-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default" }, { - "source": "TERMINATION_MDO3xxx-310eb275-188f-41fe-91b9-7d0345e45be6", + "source": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "sourceHandle": "default", - "target": "TERMINATION_MDO3xxx-d18522d8-39d9-481b-a4a9-8cc2c506b123", + "target": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "targetHandle": "default", - "id": "reactflow__edge-TERMINATION_MDO3xxx-310eb275-188f-41fe-91b9-7d0345e45be6default-TERMINATION_MDO3xxx-d18522d8-39d9-481b-a4a9-8cc2c506b123default" + "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default" }, { - "source": "TERMINATION_MDO3xxx-64e0ba45-b631-44d3-9058-f48730b6529e", + "source": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "sourceHandle": "default", - "target": "TERMINATION_MDO3xxx-d846507e-deb8-4383-b5d5-af3e210d0b63", + "target": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "targetHandle": "default", - "id": "reactflow__edge-TERMINATION_MDO3xxx-64e0ba45-b631-44d3-9058-f48730b6529edefault-TERMINATION_MDO3xxx-d846507e-deb8-4383-b5d5-af3e210d0b63default" + "id": "reactflow__edge-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default-TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577default" }, { - "source": "LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943f", + "source": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "sourceHandle": "default", - "target": "TEXT_VIEW-59f945a8-8c5f-408b-9530-8709fd9aca2c", + "target": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", "targetHandle": "default", - "id": "reactflow__edge-LIST_VISA-9c1ab80d-9702-4a81-a611-bf3e9503943fdefault-TEXT_VIEW-59f945a8-8c5f-408b-9530-8709fd9aca2cdefault" + "id": "reactflow__edge-TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577default-BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249default" }, { - "source": "TERMINATION_MDO3xxx-d18522d8-39d9-481b-a4a9-8cc2c506b123", + "source": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "sourceHandle": "default", - "target": "TABLE-45546c75-9924-4cd0-a9b8-6ed51aad0b63", + "target": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", "targetHandle": "default", - "id": "reactflow__edge-TERMINATION_MDO3xxx-d18522d8-39d9-481b-a4a9-8cc2c506b123default-TABLE-45546c75-9924-4cd0-a9b8-6ed51aad0b63default" + "id": "reactflow__edge-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default-BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457default" }, { - "source": "TERMINATION_MDO3xxx-d846507e-deb8-4383-b5d5-af3e210d0b63", + "source": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "sourceHandle": "default", - "target": "TABLE-3178a537-1e33-40e1-8c49-dc52119491e5", + "target": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "targetHandle": "default", - "id": "reactflow__edge-TERMINATION_MDO3xxx-d846507e-deb8-4383-b5d5-af3e210d0b63default-TABLE-3178a537-1e33-40e1-8c49-dc52119491e5default" + "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default-TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7default" } ], "viewport": { - "x": 887.8458928494584, - "y": 605.606098298255, - "zoom": 0.9901772457482394 + "x": 855.945537953298, + "y": 287.6844024349923, + "zoom": 2 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/docstring.txt index 421b1c7be..98b45d81e 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/docstring.txt @@ -1,22 +1,17 @@ The TRIGGER_CHANNEL_MDO3XXX node sets the triggering channel (or queries it). - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): MDO4xxx, MSO4xxx, and DPO4xxx. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). channel: int - The channel to set as the triggering channel (used if setting). + The channel to set as the triggering channel (used if set=True). query_set: str Whether to query or set the triggering channel. diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/python_code.txt index 406cc6b1f..5cf803e5f 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,48 +1,17 @@ -from flojoy import flojoy, DataContainer, TextBlob -import pyvisa +from flojoy import flojoy, DataContainer, TextBlob, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def TRIGGER_CHANNEL_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, channel: int = 0, query_set: Literal["query", "set"] = "query", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> TextBlob: - assert channel < num_channels, "Channel must be less than num_channels." - - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() match query_set: case "query": @@ -51,6 +20,4 @@ def TRIGGER_CHANNEL_MDO3XXX( tek.trigger.source(f"CH{1 + channel}") s = f"CH{1 + channel}" - tek.close() - return TextBlob(text_blob=s) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/examples/EX1/app.json index 1edf461e4..9db0ff049 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/examples/EX1/app.json @@ -4,100 +4,31 @@ { "width": 192, "height": 192, - "id": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "type": "IO", "data": { - "id": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", - "label": "TRIGGER SETTINGS MDO3xxx", - "func": "TRIGGER_SETTINGS_MDO3xxx", + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "device": { + "type": "VisaDevice", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address to connect to.", "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "VISA_address", + "functionName": "CONNECTION_MDO3XXX", + "param": "device", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, "num_channels": { "type": "int", "default": 4, "desc": "The number of channels on the instrument that are currently in use.", "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", + "functionName": "CONNECTION_MDO3XXX", "param": "num_channels", "value": 2 - }, - "query_set": { - "type": "select", - "options": [ - "query", - "set" - ], - "default": "query", - "desc": "Whether to query or set the triggering channel.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "query_set", - "value": "set" - }, - "edge_couplings": { - "type": "select", - "options": [ - "unchanged", - "ac", - "dc", - "hfrej", - "lfrej", - "noiserej" - ], - "default": "unchanged", - "desc": "Set the trigger edge coupling type.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "edge_couplings", - "value": "ac" - }, - "trigger_types": { - "type": "select", - "options": [ - "unchanged", - "edge", - "logic", - "pulse" - ], - "default": "unchanged", - "desc": "Set to trigger on edge, logic, or pulses.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "trigger_types", - "value": "edge" - }, - "edge_slope": { - "type": "select", - "options": [ - "unchanged", - "rise", - "fall", - "either" - ], - "default": "unchanged", - "desc": "Set to trigger on positive, negative, or either slopes.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "edge_slope", - "value": "rise" } }, "initCtrls": {}, @@ -115,91 +46,51 @@ "name": "default", "id": "default", "type": "Any", - "desc": "TextBlob: Summary of trigger settings." + "desc": "Optional: None" } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/TRIGGER_SETTINGS_MDO3xxx/TRIGGER_SETTINGS_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": 548.9361334388789, - "y": 4.503296195828 + "x": -938.6144043410202, + "y": 470.49780714269536 }, "selected": false, "positionAbsolute": { - "x": 548.9361334388789, - "y": 4.503296195828 + "x": -938.6144043410202, + "y": 470.49780714269536 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "id": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "type": "IO", "data": { - "id": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", - "label": "TRIGGER CHANNEL MDO3xxx", - "func": "TRIGGER_CHANNEL_MDO3xxx", + "id": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", + "label": "TRIGGER CHANNEL MDO3XXX", + "func": "TRIGGER_CHANNEL_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, - "desc": "The channel to set as the triggering channel (used if setting).", + "desc": "The channel to set as the triggering channel (used if set=True).", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", "param": "channel", - "value": 1 + "value": 0 }, "query_set": { "type": "select", @@ -210,9 +101,9 @@ "default": "query", "desc": "Whether to query or set the triggering channel.", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", "param": "query_set", - "value": "set" + "value": "query" } }, "initCtrls": {}, @@ -229,92 +120,52 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "TextBlob", "desc": "TextBlob: The triggering channel (e.g. CH1)." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TRIGGER_CHANNEL_MDO3xxx/TRIGGER_CHANNEL_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/TRIGGER_CHANNEL_MDO3XXX.py", "selected": false }, "position": { - "x": -333.19502014401803, - "y": 4.5596734231639005 + "x": -570.9525773294033, + "y": 466.494436792541 }, "selected": false, "positionAbsolute": { - "x": -333.19502014401803, - "y": 4.5596734231639005 + "x": -570.9525773294033, + "y": 466.494436792541 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "id": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "type": "IO", "data": { - "id": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", - "label": "TRIGGER LEVEL MDO3xxx", - "func": "TRIGGER_LEVEL_MDO3xxx", + "id": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", + "label": "TRIGGER LEVEL MDO3XXX", + "func": "TRIGGER_LEVEL_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_LEVEL_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "trigger_volts": { "type": "float", "default": 0.1, "desc": "The voltage to set the triggering level to.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", + "functionName": "TRIGGER_LEVEL_MDO3XXX", "param": "trigger_volts", - "value": 0.05 + "value": 0.1 }, "query_set": { "type": "select", @@ -325,9 +176,9 @@ "default": "query", "desc": "Whether to query or set the triggering voltage.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", + "functionName": "TRIGGER_LEVEL_MDO3XXX", "param": "query_set", - "value": "set" + "value": "query" } }, "initCtrls": {}, @@ -344,53 +195,120 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "Scalar", "desc": "Scalar: The triggering voltage." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/TRIGGER_LEVEL_MDO3XXX.py", + "selected": false + }, + "position": { + "x": 149.8114874246843, + "y": 479.5869710079853 + }, + "selected": false, + "positionAbsolute": { + "x": 149.8114874246843, + "y": 479.5869710079853 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", + "type": "IO", + "data": { + "id": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", + "label": "TERMINATION MDO3XXX", + "func": "TERMINATION_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" }, - { - "name": "pyusb", - "v": "1.2.1" + "channel": { + "type": "int", + "default": 0, + "desc": "The channel to query or set the impedance/termination.", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "channel", + "value": 0 }, - { - "name": "zeroconf", - "v": "0.102.0" + "termination": { + "type": "select", + "options": [ + "50 ohm", + "75 ohm", + "1M ohm" + ], + "default": "50 ohm", + "desc": "The ohm to which the termination impedance is set to.", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "termination", + "value": "50 ohm" }, + "query_set": { + "type": "select", + "options": [ + "query", + "set" + ], + "default": "query", + "desc": "Whether to query or set the triggering voltage.", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "query_set", + "value": "query" + } + }, + "initCtrls": {}, + "inputs": [ { - "name": "pyvisa_py", - "v": "0.7.0" - }, + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ { - "name": "qcodes", - "v": "0.39.1" + "name": "default", + "id": "default", + "type": "Scalar", + "desc": "Scalar: The termination value for the chosen channel." } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TRIGGER_LEVEL_MDO3xxx/TRIGGER_LEVEL_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/TERMINATION_MDO3XXX.py", "selected": false }, "position": { - "x": 130.12284142919947, - "y": -0.0042271661209838385 + "x": -208.52964407405477, + "y": 477.0224555404336 }, "selected": false, "positionAbsolute": { - "x": 130.12284142919947, - "y": -0.0042271661209838385 + "x": -208.52964407405477, + "y": 477.0224555404336 }, "dragging": true }, { "width": 384, "height": 288, - "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "id": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "type": "VISUALIZERS", "data": { - "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "id": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "label": "TEXT VIEW", "func": "TEXT_VIEW", "type": "VISUALIZERS", @@ -409,68 +327,168 @@ "selected": false }, "position": { - "x": 942.5982011541996, - "y": -45.01637229744068 + "x": -236.5887560458949, + "y": 214.9500448205381 }, "selected": false, "positionAbsolute": { - "x": 942.5982011541996, - "y": -45.01637229744068 + "x": -236.5887560458949, + "y": 214.9500448205381 }, "dragging": true }, { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", + "width": 380, + "height": 293, + "id": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", "type": "VISUALIZERS", "data": { - "id": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", - "label": "TEXT VIEW 1", - "func": "TEXT_VIEW", + "id": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", + "label": "BIG NUMBER", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "TextBlob", + "type": "OrderedPair|Scalar|Vector", "multiple": false, - "desc": "the DataContainer to be visualized in text format" + "desc": "the DataContainer to be visualized" } ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing the Plotly big number visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 102.63900384280683, - "y": -269.7519096052588 + "x": 123.40424633518722, + "y": 702.8387346964474 }, "selected": false, "positionAbsolute": { - "x": 102.63900384280683, - "y": -269.7519096052588 + "x": 123.40424633518722, + "y": 702.8387346964474 }, "dragging": true }, { "width": 380, "height": 293, - "id": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", + "id": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", "type": "VISUALIZERS", "data": { - "id": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", - "label": "TABLE", - "func": "TABLE", + "id": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", + "label": "BIG NUMBER 1", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "OrderedPair|Scalar|Vector", "multiple": false, "desc": "the DataContainer to be visualized" } @@ -480,65 +498,72 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 538.5213471606752, - "y": -269.79286044112655 + "x": 484.61744162067066, + "y": 463.62850205243456 }, "selected": false, "positionAbsolute": { - "x": 538.5213471606752, - "y": -269.79286044112655 + "x": 484.61744162067066, + "y": 463.62850205243456 }, "dragging": true } ], "edges": [ { - "source": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "source": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "sourceHandle": "default", + "target": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", + "targetHandle": "default", + "id": "reactflow__edge-CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56default-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default" + }, + { + "source": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "sourceHandle": "default", - "target": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "target": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3badefault-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default" + "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default" }, { - "source": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "source": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "sourceHandle": "default", - "target": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", + "target": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3badefault-TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fedefault" + "id": "reactflow__edge-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default-TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577default" }, { - "source": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "source": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "sourceHandle": "default", - "target": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "target": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default-TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215bdefault" + "id": "reactflow__edge-TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577default-BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249default" }, { - "source": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "source": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "sourceHandle": "default", - "target": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", + "target": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default-TABLE-c8942fe3-268d-46e7-8a9b-be02d64720dadefault" + "id": "reactflow__edge-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default-BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457default" }, { - "source": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "source": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "sourceHandle": "default", - "target": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "target": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215bdefault-TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40default" + "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default-TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7default" } ], "viewport": { - "x": 1104.261946392206, - "y": 573.1338859553202, - "zoom": 1.2154437530123414 + "x": 855.945537953298, + "y": 287.6844024349923, + "zoom": 2 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/docstring.txt index 93ce6b0ae..6c25dcb91 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/docstring.txt @@ -3,21 +3,16 @@ The TRIGGER_LEVEL_MDO3XXX node sets the trigger voltage (or queries it). The trigger voltage is the level at which an oscilloscope will find the start of a signal. - If the "VISA_address" parameter is not specified the VISA_index will be - used to find the address. The LIST_VISA node can be used to show the - indicies of all available VISA instruments. + Requires a CONNECTION_MDO3XXX node at the start of the app to connect with + the instrument. The VISA address will then be listed under 'connection'. This node should also work with compatible Tektronix scopes (untested): MDO4xxx, MSO4xxx, and DPO4xxx. Parameters ---------- - VISA_address: str - The VISA address to query. - VISA_index: int - The address will be found from LIST_VISA node list with this index. - num_channels: int - The number of channels on the instrument that are currently in use. + connection: VisaConnection + The VISA address (requires the CONNECTION_MDO3XXX node). trigger_volts: float The voltage to set the triggering level to. query_set: str diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/python_code.txt index fc2d29c52..7d97ea4e0 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/a1-[autogen]/python_code.txt @@ -1,46 +1,17 @@ -from flojoy import flojoy, DataContainer, Scalar -import pyvisa +from flojoy import flojoy, DataContainer, Scalar, VisaConnection from typing import Optional, Literal -from flojoy.instruments.tektronix.MDO30xx import TektronixMDO30xx -from usb.core import USBError -@flojoy( - deps={ - "pyvisa": "1.13.0", - "pyusb": "1.2.1", - "zeroconf": "0.102.0", - "pyvisa_py": "0.7.0", - "qcodes": "0.39.1", - } -) +@flojoy(inject_connection=True) def TRIGGER_LEVEL_MDO3XXX( - VISA_address: Optional[str], - VISA_index: Optional[int] = 0, - num_channels: int = 4, + connection: VisaConnection, trigger_volts: float = 0.1, query_set: Literal["query", "set"] = "query", default: Optional[DataContainer] = None, -) -> Optional[DataContainer]: +) -> Scalar: - rm = pyvisa.ResourceManager("@py") - if VISA_address == "": - VISA_addresses = rm.list_resources() - VISA_address = VISA_addresses[int(VISA_index)] - - try: - tek = TektronixMDO30xx( - "MDO30xx", - VISA_address, - visalib="@py", - device_clear=False, - number_of_channels=num_channels, - ) - except USBError as err: - raise Exception( - "USB port error. Trying unplugging+replugging the port." - ) from err + tek = connection.get_handle() match query_set: case "query": @@ -50,6 +21,4 @@ def TRIGGER_LEVEL_MDO3XXX( tek.trigger.level(trigger_volts) c = trigger_volts - tek.close() - return Scalar(c=c) diff --git a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/examples/EX1/app.json index 1edf461e4..9db0ff049 100644 --- a/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/examples/EX1/app.json @@ -4,100 +4,31 @@ { "width": 192, "height": 192, - "id": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", "type": "IO", "data": { - "id": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", - "label": "TRIGGER SETTINGS MDO3xxx", - "func": "TRIGGER_SETTINGS_MDO3xxx", + "id": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "label": "CONNECTION MDO3XXX", + "func": "CONNECTION_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "device": { + "type": "VisaDevice", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address to connect to.", "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "VISA_address", + "functionName": "CONNECTION_MDO3XXX", + "param": "device", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, "num_channels": { "type": "int", "default": 4, "desc": "The number of channels on the instrument that are currently in use.", "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", + "functionName": "CONNECTION_MDO3XXX", "param": "num_channels", "value": 2 - }, - "query_set": { - "type": "select", - "options": [ - "query", - "set" - ], - "default": "query", - "desc": "Whether to query or set the triggering channel.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "query_set", - "value": "set" - }, - "edge_couplings": { - "type": "select", - "options": [ - "unchanged", - "ac", - "dc", - "hfrej", - "lfrej", - "noiserej" - ], - "default": "unchanged", - "desc": "Set the trigger edge coupling type.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "edge_couplings", - "value": "ac" - }, - "trigger_types": { - "type": "select", - "options": [ - "unchanged", - "edge", - "logic", - "pulse" - ], - "default": "unchanged", - "desc": "Set to trigger on edge, logic, or pulses.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "trigger_types", - "value": "edge" - }, - "edge_slope": { - "type": "select", - "options": [ - "unchanged", - "rise", - "fall", - "either" - ], - "default": "unchanged", - "desc": "Set to trigger on positive, negative, or either slopes.", - "overload": null, - "functionName": "TRIGGER_SETTINGS_MDO3xxx", - "param": "edge_slope", - "value": "rise" } }, "initCtrls": {}, @@ -115,91 +46,51 @@ "name": "default", "id": "default", "type": "Any", - "desc": "TextBlob: Summary of trigger settings." + "desc": "Optional: None" } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/ADVANCED/TRIGGER_SETTINGS_MDO3xxx/TRIGGER_SETTINGS_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX.py", "selected": false }, "position": { - "x": 548.9361334388789, - "y": 4.503296195828 + "x": -938.6144043410202, + "y": 470.49780714269536 }, "selected": false, "positionAbsolute": { - "x": 548.9361334388789, - "y": 4.503296195828 + "x": -938.6144043410202, + "y": 470.49780714269536 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "id": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "type": "IO", "data": { - "id": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", - "label": "TRIGGER CHANNEL MDO3xxx", - "func": "TRIGGER_CHANNEL_MDO3xxx", + "id": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", + "label": "TRIGGER CHANNEL MDO3XXX", + "func": "TRIGGER_CHANNEL_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "channel": { "type": "int", "default": 0, - "desc": "The channel to set as the triggering channel (used if setting).", + "desc": "The channel to set as the triggering channel (used if set=True).", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", "param": "channel", - "value": 1 + "value": 0 }, "query_set": { "type": "select", @@ -210,9 +101,9 @@ "default": "query", "desc": "Whether to query or set the triggering channel.", "overload": null, - "functionName": "TRIGGER_CHANNEL_MDO3xxx", + "functionName": "TRIGGER_CHANNEL_MDO3XXX", "param": "query_set", - "value": "set" + "value": "query" } }, "initCtrls": {}, @@ -229,92 +120,52 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "TextBlob", "desc": "TextBlob: The triggering channel (e.g. CH1)." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" - }, - { - "name": "pyusb", - "v": "1.2.1" - }, - { - "name": "zeroconf", - "v": "0.102.0" - }, - { - "name": "pyvisa_py", - "v": "0.7.0" - }, - { - "name": "qcodes", - "v": "0.39.1" - } - ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TRIGGER_CHANNEL_MDO3xxx/TRIGGER_CHANNEL_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_CHANNEL_MDO3XXX/TRIGGER_CHANNEL_MDO3XXX.py", "selected": false }, "position": { - "x": -333.19502014401803, - "y": 4.5596734231639005 + "x": -570.9525773294033, + "y": 466.494436792541 }, "selected": false, "positionAbsolute": { - "x": -333.19502014401803, - "y": 4.5596734231639005 + "x": -570.9525773294033, + "y": 466.494436792541 }, "dragging": true }, { "width": 192, "height": 192, - "id": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "id": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "type": "IO", "data": { - "id": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", - "label": "TRIGGER LEVEL MDO3xxx", - "func": "TRIGGER_LEVEL_MDO3xxx", + "id": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", + "label": "TRIGGER LEVEL MDO3XXX", + "func": "TRIGGER_LEVEL_MDO3XXX", "type": "IO", "ctrls": { - "VISA_address": { - "type": "str", + "connection": { + "type": "VisaConnection", "default": null, - "desc": "The VISA address to query.", + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "VISA_address", + "functionName": "TRIGGER_LEVEL_MDO3XXX", + "param": "connection", "value": "USB0::1689::1032::C012101::0::INSTR" }, - "VISA_index": { - "type": "int", - "default": 0, - "desc": "The address will be found from LIST_VISA node list with this index.", - "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "VISA_index", - "value": 0 - }, - "num_channels": { - "type": "int", - "default": 4, - "desc": "The number of channels on the instrument that are currently in use.", - "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", - "param": "num_channels", - "value": 2 - }, "trigger_volts": { "type": "float", "default": 0.1, "desc": "The voltage to set the triggering level to.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", + "functionName": "TRIGGER_LEVEL_MDO3XXX", "param": "trigger_volts", - "value": 0.05 + "value": 0.1 }, "query_set": { "type": "select", @@ -325,9 +176,9 @@ "default": "query", "desc": "Whether to query or set the triggering voltage.", "overload": null, - "functionName": "TRIGGER_LEVEL_MDO3xxx", + "functionName": "TRIGGER_LEVEL_MDO3XXX", "param": "query_set", - "value": "set" + "value": "query" } }, "initCtrls": {}, @@ -344,53 +195,120 @@ { "name": "default", "id": "default", - "type": "Any", + "type": "Scalar", "desc": "Scalar: The triggering voltage." } ], - "pip_dependencies": [ - { - "name": "pyvisa", - "v": "1.13.0" + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TRIGGER_LEVEL_MDO3XXX/TRIGGER_LEVEL_MDO3XXX.py", + "selected": false + }, + "position": { + "x": 149.8114874246843, + "y": 479.5869710079853 + }, + "selected": false, + "positionAbsolute": { + "x": 149.8114874246843, + "y": 479.5869710079853 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", + "type": "IO", + "data": { + "id": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", + "label": "TERMINATION MDO3XXX", + "func": "TERMINATION_MDO3XXX", + "type": "IO", + "ctrls": { + "connection": { + "type": "VisaConnection", + "default": null, + "desc": "The VISA address (requires the CONNECTION_MDO3XXX node).", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "connection", + "value": "USB0::1689::1032::C012101::0::INSTR" }, - { - "name": "pyusb", - "v": "1.2.1" + "channel": { + "type": "int", + "default": 0, + "desc": "The channel to query or set the impedance/termination.", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "channel", + "value": 0 }, - { - "name": "zeroconf", - "v": "0.102.0" + "termination": { + "type": "select", + "options": [ + "50 ohm", + "75 ohm", + "1M ohm" + ], + "default": "50 ohm", + "desc": "The ohm to which the termination impedance is set to.", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "termination", + "value": "50 ohm" }, + "query_set": { + "type": "select", + "options": [ + "query", + "set" + ], + "default": "query", + "desc": "Whether to query or set the triggering voltage.", + "overload": null, + "functionName": "TERMINATION_MDO3XXX", + "param": "query_set", + "value": "query" + } + }, + "initCtrls": {}, + "inputs": [ { - "name": "pyvisa_py", - "v": "0.7.0" - }, + "name": "default", + "id": "default", + "type": "Any", + "multiple": false, + "desc": null + } + ], + "outputs": [ { - "name": "qcodes", - "v": "0.39.1" + "name": "default", + "id": "default", + "type": "Scalar", + "desc": "Scalar: The termination value for the chosen channel." } ], - "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3xxx/BASIC/TRIGGER_LEVEL_MDO3xxx/TRIGGER_LEVEL_MDO3xxx.py", + "path": "IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/TERMINATION_MDO3XXX/TERMINATION_MDO3XXX.py", "selected": false }, "position": { - "x": 130.12284142919947, - "y": -0.0042271661209838385 + "x": -208.52964407405477, + "y": 477.0224555404336 }, "selected": false, "positionAbsolute": { - "x": 130.12284142919947, - "y": -0.0042271661209838385 + "x": -208.52964407405477, + "y": 477.0224555404336 }, "dragging": true }, { "width": 384, "height": 288, - "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "id": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "type": "VISUALIZERS", "data": { - "id": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "id": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "label": "TEXT VIEW", "func": "TEXT_VIEW", "type": "VISUALIZERS", @@ -409,68 +327,168 @@ "selected": false }, "position": { - "x": 942.5982011541996, - "y": -45.01637229744068 + "x": -236.5887560458949, + "y": 214.9500448205381 }, "selected": false, "positionAbsolute": { - "x": 942.5982011541996, - "y": -45.01637229744068 + "x": -236.5887560458949, + "y": 214.9500448205381 }, "dragging": true }, { - "width": 384, - "height": 288, - "id": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", + "width": 380, + "height": 293, + "id": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", "type": "VISUALIZERS", "data": { - "id": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", - "label": "TEXT VIEW 1", - "func": "TEXT_VIEW", + "id": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", + "label": "BIG NUMBER", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "TextBlob", + "type": "OrderedPair|Scalar|Vector", "multiple": false, - "desc": "the DataContainer to be visualized in text format" + "desc": "the DataContainer to be visualized" } ], - "path": "VISUALIZERS/DATA_STRUCTURE/TEXT_VIEW/TEXT_VIEW.py", + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing the Plotly big number visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 102.63900384280683, - "y": -269.7519096052588 + "x": 123.40424633518722, + "y": 702.8387346964474 }, "selected": false, "positionAbsolute": { - "x": 102.63900384280683, - "y": -269.7519096052588 + "x": 123.40424633518722, + "y": 702.8387346964474 }, "dragging": true }, { "width": 380, "height": 293, - "id": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", + "id": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", "type": "VISUALIZERS", "data": { - "id": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", - "label": "TABLE", - "func": "TABLE", + "id": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", + "label": "BIG NUMBER 1", + "func": "BIG_NUMBER", "type": "VISUALIZERS", - "ctrls": {}, + "ctrls": { + "suffix": { + "type": "str", + "default": null, + "desc": "any suffix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "suffix", + "value": "" + }, + "prefix": { + "type": "str", + "default": null, + "desc": "any prefix to show with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "prefix", + "value": "" + }, + "title": { + "type": "str", + "default": null, + "desc": "title of the plot, default = \"BIG_NUMBER\"", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "title", + "value": "" + }, + "relative_delta": { + "type": "bool", + "default": true, + "desc": "whether or not to show the relative delta from the last run along with big number", + "overload": null, + "functionName": "BIG_NUMBER", + "param": "relative_delta", + "value": true + }, + "scientific_notation": { + "type": "bool", + "default": false, + "desc": null, + "overload": null, + "functionName": "BIG_NUMBER", + "param": "scientific_notation", + "value": false + } + }, "initCtrls": {}, "inputs": [ { "name": "default", "id": "default", - "type": "OrderedTriple|OrderedPair|DataFrame|Vector|Scalar", + "type": "OrderedPair|Scalar|Vector", "multiple": false, "desc": "the DataContainer to be visualized" } @@ -480,65 +498,72 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Table visualization" + "desc": "the DataContainer containing the Plotly big number visualization" } ], - "path": "VISUALIZERS/PLOTLY/TABLE/TABLE.py", + "path": "VISUALIZERS/PLOTLY/BIG_NUMBER/BIG_NUMBER.py", "selected": false }, "position": { - "x": 538.5213471606752, - "y": -269.79286044112655 + "x": 484.61744162067066, + "y": 463.62850205243456 }, "selected": false, "positionAbsolute": { - "x": 538.5213471606752, - "y": -269.79286044112655 + "x": 484.61744162067066, + "y": 463.62850205243456 }, "dragging": true } ], "edges": [ { - "source": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "source": "CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56", + "sourceHandle": "default", + "target": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", + "targetHandle": "default", + "id": "reactflow__edge-CONNECTION_MDO3XXX-aa9a5c99-20e6-444c-a550-ac552f791a56default-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default" + }, + { + "source": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "sourceHandle": "default", - "target": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "target": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3badefault-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default" + "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default" }, { - "source": "TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3ba", + "source": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "sourceHandle": "default", - "target": "TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fe", + "target": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3xxx-479912ed-9ee5-4deb-a846-4c873a2ce3badefault-TEXT_VIEW-656bfc70-ea18-4fcd-9263-0205afaba0fedefault" + "id": "reactflow__edge-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default-TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577default" }, { - "source": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "source": "TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577", "sourceHandle": "default", - "target": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "target": "BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default-TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215bdefault" + "id": "reactflow__edge-TRIGGER_LEVEL_MDO3XXX-181c17a3-c48d-47ac-b87e-2d4b12988577default-BIG_NUMBER-5cf6b81c-ad59-4e32-a87a-696f5e318249default" }, { - "source": "TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3", + "source": "TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679", "sourceHandle": "default", - "target": "TABLE-c8942fe3-268d-46e7-8a9b-be02d64720da", + "target": "BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_LEVEL_MDO3xxx-15623ef2-65cb-4d0e-a238-20af3ff065c3default-TABLE-c8942fe3-268d-46e7-8a9b-be02d64720dadefault" + "id": "reactflow__edge-TERMINATION_MDO3XXX-8b73c21d-c6a0-47eb-8f86-55b330c7e679default-BIG_NUMBER-55e20b98-1835-4d2d-b780-bc59b89a8457default" }, { - "source": "TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215b", + "source": "TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2", "sourceHandle": "default", - "target": "TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40", + "target": "TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7", "targetHandle": "default", - "id": "reactflow__edge-TRIGGER_SETTINGS_MDO3xxx-27df0227-9b2a-4132-bc69-3522d543215bdefault-TEXT_VIEW-c807e381-2130-4944-b8b7-f46f4b0a8d40default" + "id": "reactflow__edge-TRIGGER_CHANNEL_MDO3XXX-cf419afe-2271-4831-9d0a-b4e8e00c18a2default-TEXT_VIEW-fc0fcff6-9d54-458c-99ed-119ebefa9df7default" } ], "viewport": { - "x": 1104.261946392206, - "y": 573.1338859553202, - "zoom": 1.2154437530123414 + "x": 855.945537953298, + "y": 287.6844024349923, + "zoom": 2 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/QCODES/CLOSE_ALL/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/QCODES/CLOSE_ALL/a1-[autogen]/docstring.txt index dff87e7f9..918cc77c7 100644 --- a/docs/nodes/IO/INSTRUMENTS/QCODES/CLOSE_ALL/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/QCODES/CLOSE_ALL/a1-[autogen]/docstring.txt @@ -1,7 +1,6 @@ -The CLOSE_ALL node closes all qcodes instruments and should be ran at - the end of each Flojoy app that uses qcodes (and possibly the beginning). +The CLOSE_ALL node closes all QCoDeS instruments and should be run at the start and end of each Flojoy app that uses QCoDeS. Returns ------- DataContainer - optional: The input DataContainer is returned. + optional: The input DataContainer that is returned. diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/docstring.txt index 474beb1cb..87fc889b0 100644 --- a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/docstring.txt @@ -1,8 +1,15 @@ -The KEITHLEY2400 node takes a IV curve measurement with a Keithley 2400 source meter, send voltages, and measures currents. +The IV_SWEEP node takes an I-V curve measurement with a Keithley 2400 source meter, send voltages, and measures currents. + + Inputs + ------ + default: OrderedPair | Vector + The voltages to send to the Keithley 2400 source meter. Parameters - ----------- - comport : string - defines the serial communication port for the Keithley2400 source meter. - baudrate : float - specifies the baud rate for the serial communication between the Keithley2400 and the computer + ---------- + connection: Serial + The open connection with the Keithley2400 source meter. + + Returns + ------- + OrderedPair diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/python_code.txt index 822d972e5..9f7546ea4 100644 --- a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/a1-[autogen]/python_code.txt @@ -1,24 +1,26 @@ -from flojoy import flojoy, OrderedPair, Vector, node_initialization, NodeInitContainer import serial +import numpy as np +from flojoy import SerialConnection, flojoy, OrderedPair, Vector +from typing import cast -@flojoy(deps={"pyserial": "3.5"}) +@flojoy(deps={"pyserial": "3.5"}, inject_connection=True) def IV_SWEEP( - init_container: NodeInitContainer, default: OrderedPair | Vector + connection: SerialConnection, default: OrderedPair | Vector ) -> OrderedPair: # Start serial communication with the instrument - # ser: serial = serial.Serial() + ser = cast(serial.Serial, connection.get_handle()) - ser = init_container.get() if ser is None: raise ValueError("Serial communication is not open") # Keithley 2400 Configuration ser.write(b"*RST\n") # reinitialisation of the instrument - ser.write(b":SOUR:FUNC:MODE VOLT\n") # Sourcing tension - ser.write(b':SENS:FUNC "CURR"\n') # Measuring current + ser.write( + b":SOUR:FUNC:MODE VOLT\n" + ) # Sourcing tension ser.write(b':SENS:FUNC "CURR"\n') # Measuring current ser.write( b":SENS:CURR:PROT 1.05\n" ) # Current protection set at 1.05A (Keithley 2400) @@ -37,11 +39,8 @@ def IV_SWEEP( ser.write(b":INIT\n") # Start measuring ser.write(b":FETC?\n") # Retrieve the measured values - current_str: str = ( - ser.readline().decode("ascii").strip() - ) # Save answers in a string - voltage_current_values: str = current_str.split( - ",") # Split the string + current_str = ser.readline().decode("ascii").strip() # Save answers in a string + voltage_current_values = current_str.split(",") # Split the string currents_neg.append(-float(voltage_current_values[1])) ser.write(b":OUTP OFF\n") # Close output from Instrument @@ -49,23 +48,4 @@ def IV_SWEEP( # Close Serial Communication ser.close() - return OrderedPair(x=voltages, y=currents_neg) - - -@node_initialization(for_node=IV_SWEEP) -def init(comport: str = "/dev/ttyUSB0", baudrate: float = 9600): - ser: serial = serial.Serial() - - # Specific parameters - ser.port = comport # Specify serial port for com - ser.baudrate = baudrate # Specify Baudrate - - # General parameters - ser.bytesize = serial.EIGHTBITS # Specify Bites number - ser.parity = serial.PARITY_NONE # Specify Parity - ser.stopbits = serial.STOPBITS_ONE # Specify Stop bites - ser.timeout = 1 - # Open Serial Com - ser.open() - - return ser + return OrderedPair(x=voltages, y=np.array(currents_neg)) diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/examples/EX1/app.json index 2617aef0d..6784b0692 100644 --- a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/examples/EX1/app.json +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/examples/EX1/app.json @@ -4,32 +4,84 @@ { "width": 192, "height": 192, - "id": "KEITHLEY2400-33053219-7ec1-40d0-9cb9-5d337294a01e", - "type": "INSTRUMENTS", + "id": "OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1", + "type": "IO", "data": { - "id": "KEITHLEY2400-33053219-7ec1-40d0-9cb9-5d337294a01e", - "label": "KEITHLEY2400", - "func": "KEITHLEY2400", - "type": "INSTRUMENTS", - "ctrls": {}, - "initCtrls": { - "comport": { - "type": "str", - "default": "/dev/ttyUSB0", + "id": "OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1", + "label": "OPEN KEITHLEY 24XX", + "func": "OPEN_KEITHLEY_24XX", + "type": "IO", + "ctrls": { + "device": { + "type": "SerialDevice", + "default": null, "desc": null, - "functionName": "KEITHLEY2400", - "param": "comport", - "value": "/dev/ttyUSB0" + "overload": null, + "functionName": "OPEN_KEITHLEY_24XX", + "param": "device", + "value": "" }, "baudrate": { - "type": "float", + "type": "int", "default": 9600, "desc": null, - "functionName": "KEITHLEY2400", + "overload": null, + "functionName": "OPEN_KEITHLEY_24XX", "param": "baudrate", "value": 9600 } }, + "initCtrls": {}, + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": null + } + ], + "pip_dependencies": [ + { + "name": "pyserial", + "v": "3.5" + } + ], + "path": "IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/OPEN_KEITHLEY_24XX.py", + "selected": false + }, + "position": { + "x": -140.35863305434796, + "y": 1.9088042829506549 + }, + "selected": false, + "positionAbsolute": { + "x": -140.35863305434796, + "y": 1.9088042829506549 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", + "type": "IO", + "data": { + "id": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", + "label": "IV SWEEP", + "func": "IV_SWEEP", + "type": "IO", + "ctrls": { + "connection": { + "type": "SerialConnection", + "default": null, + "desc": null, + "overload": null, + "functionName": "IV_SWEEP", + "param": "connection", + "value": "" + } + }, + "initCtrls": {}, "inputs": [ { "name": "default", @@ -53,27 +105,27 @@ "v": "3.5" } ], - "path": "PYTHON/nodes/INSTRUMENTS/KEITHLEY/KEITHLEY2400/KEITHLEY2400.py", + "path": "IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/IV_SWEEP.py", "selected": false }, "position": { - "x": 114.41979939902592, - "y": -225.9703888733589 + "x": 511.6912461233678, + "y": 5.980216390951398 }, "selected": false, "positionAbsolute": { - "x": 114.41979939902592, - "y": -225.9703888733589 + "x": 511.6912461233678, + "y": 5.980216390951398 }, "dragging": true }, { "width": 208, "height": 96, - "id": "LINSPACE-a3ec55cd-d572-437a-a823-7a8707fc2099", + "id": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", "type": "GENERATORS", "data": { - "id": "LINSPACE-a3ec55cd-d572-437a-a823-7a8707fc2099", + "id": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", "label": "LINSPACE", "func": "LINSPACE", "type": "GENERATORS", @@ -82,6 +134,7 @@ "type": "float", "default": 10, "desc": "The start point of the data.", + "overload": null, "functionName": "LINSPACE", "param": "start", "value": 10 @@ -90,6 +143,7 @@ "type": "float", "default": 0, "desc": "The end point of the data.", + "overload": null, "functionName": "LINSPACE", "param": "end", "value": 0 @@ -98,9 +152,10 @@ "type": "int", "default": 1000, "desc": "The number of points in the vector.", + "overload": null, "functionName": "LINSPACE", "param": "step", - "value": 1000 + "value": 10 } }, "initCtrls": {}, @@ -118,32 +173,32 @@ "name": "default", "id": "default", "type": "Vector", - "desc": "v: the vector between start and end with step number of points." + "desc": "v: the vector between 'start' and 'end' with a 'step' number of points." } ], - "path": "PYTHON/nodes/GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", "selected": false }, "position": { - "x": -220.989828306302, - "y": -177.3419913453396 + "x": 192.47824090745922, + "y": 49.8416165273091 }, "selected": false, "positionAbsolute": { - "x": -220.989828306302, - "y": -177.3419913453396 + "x": 192.47824090745922, + "y": 49.8416165273091 }, "dragging": true }, { "width": 225, "height": 226, - "id": "LINE-5ea158cf-c235-4bff-bec2-0714507a1bf0", + "id": "SCATTER-fee34277-0702-4342-af77-37c9d68701c6", "type": "VISUALIZERS", "data": { - "id": "LINE-5ea158cf-c235-4bff-bec2-0714507a1bf0", - "label": "LINE", - "func": "LINE", + "id": "SCATTER-fee34277-0702-4342-af77-37c9d68701c6", + "label": "SCATTER", + "func": "SCATTER", "type": "VISUALIZERS", "ctrls": {}, "initCtrls": {}, @@ -161,44 +216,51 @@ "name": "default", "id": "default", "type": "Plotly", - "desc": "the DataContainer containing Plotly Line visualization of the input data" + "desc": "the DataContainer containing the Plotly Scatter visualization" } ], - "path": "PYTHON/nodes/VISUALIZERS/PLOTLY/LINE/LINE.py", - "selected": true + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false }, "position": { - "x": 448.130869654421, - "y": -243.92275361997378 + "x": 822.0611229804773, + "y": -8.822814846961876 }, - "selected": true, + "selected": false, "positionAbsolute": { - "x": 448.130869654421, - "y": -243.92275361997378 + "x": 822.0611229804773, + "y": -8.822814846961876 }, "dragging": true } ], "edges": [ { - "source": "LINSPACE-a3ec55cd-d572-437a-a823-7a8707fc2099", + "source": "OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1", + "sourceHandle": "default", + "target": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", + "targetHandle": "default", + "id": "reactflow__edge-OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1default-LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28default" + }, + { + "source": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", "sourceHandle": "default", - "target": "KEITHLEY2400-33053219-7ec1-40d0-9cb9-5d337294a01e", + "target": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", "targetHandle": "default", - "id": "reactflow__edge-LINSPACE-a3ec55cd-d572-437a-a823-7a8707fc2099default-KEITHLEY2400-33053219-7ec1-40d0-9cb9-5d337294a01edefault" + "id": "reactflow__edge-LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28default-IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7default" }, { - "source": "KEITHLEY2400-33053219-7ec1-40d0-9cb9-5d337294a01e", + "source": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", "sourceHandle": "default", - "target": "LINE-5ea158cf-c235-4bff-bec2-0714507a1bf0", + "target": "SCATTER-fee34277-0702-4342-af77-37c9d68701c6", "targetHandle": "default", - "id": "reactflow__edge-KEITHLEY2400-33053219-7ec1-40d0-9cb9-5d337294a01edefault-LINE-5ea158cf-c235-4bff-bec2-0714507a1bf0default" + "id": "reactflow__edge-IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7default-SCATTER-fee34277-0702-4342-af77-37c9d68701c6default" } ], "viewport": { - "x": 621.1813795484834, - "y": 324.9597014372874, - "zoom": 0.6891413136990774 + "x": 255.10425070720453, + "y": 317.88940714410813, + "zoom": 0.5 } } } \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/OPEN_KEITHLEY_24XX.md b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/OPEN_KEITHLEY_24XX.md new file mode 100644 index 000000000..ba9d4f78f --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/OPEN_KEITHLEY_24XX.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/a1-[autogen]/docstring.txt b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..09000ede9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/a1-[autogen]/docstring.txt @@ -0,0 +1,10 @@ +The OPEN_KEITHLEY_24XX node opens a connection with the Keithley 2400 source meter. + + Parameters + ---------- + device: Serial + The connected serial device corresponding to the Keithley 2400 source meter. + + Returns + ------- + None diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/a1-[autogen]/python_code.txt b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..c32487e86 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/a1-[autogen]/python_code.txt @@ -0,0 +1,24 @@ +import serial +from typing import Optional +from flojoy import SerialDevice, flojoy, DataContainer +from flojoy.connection_manager import DeviceConnectionManager + + +@flojoy(deps={"pyserial": "3.5"}) +def OPEN_KEITHLEY_24XX( + device: SerialDevice, baudrate: int = 9600 +) -> Optional[DataContainer]: + + + ser = serial.Serial( + port=device.get_port(), + baudrate=baudrate, + bytesize=serial.EIGHTBITS, + parity=serial.PARITY_NONE, + stopbits=serial.STOPBITS_ONE, + timeout=1, + ) + + DeviceConnectionManager.register_connection(device, ser) + + return None diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/hardware.md b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/media.md b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/notes.md b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/examples/EX1/app.json b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/examples/EX1/app.json new file mode 100644 index 000000000..6784b0692 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/examples/EX1/app.json @@ -0,0 +1,266 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 192, + "height": 192, + "id": "OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1", + "type": "IO", + "data": { + "id": "OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1", + "label": "OPEN KEITHLEY 24XX", + "func": "OPEN_KEITHLEY_24XX", + "type": "IO", + "ctrls": { + "device": { + "type": "SerialDevice", + "default": null, + "desc": null, + "overload": null, + "functionName": "OPEN_KEITHLEY_24XX", + "param": "device", + "value": "" + }, + "baudrate": { + "type": "int", + "default": 9600, + "desc": null, + "overload": null, + "functionName": "OPEN_KEITHLEY_24XX", + "param": "baudrate", + "value": 9600 + } + }, + "initCtrls": {}, + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Any", + "desc": null + } + ], + "pip_dependencies": [ + { + "name": "pyserial", + "v": "3.5" + } + ], + "path": "IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/OPEN_KEITHLEY_24XX.py", + "selected": false + }, + "position": { + "x": -140.35863305434796, + "y": 1.9088042829506549 + }, + "selected": false, + "positionAbsolute": { + "x": -140.35863305434796, + "y": 1.9088042829506549 + }, + "dragging": true + }, + { + "width": 192, + "height": 192, + "id": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", + "type": "IO", + "data": { + "id": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", + "label": "IV SWEEP", + "func": "IV_SWEEP", + "type": "IO", + "ctrls": { + "connection": { + "type": "SerialConnection", + "default": null, + "desc": null, + "overload": null, + "functionName": "IV_SWEEP", + "param": "connection", + "value": "" + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|Vector", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair", + "desc": null + } + ], + "pip_dependencies": [ + { + "name": "pyserial", + "v": "3.5" + } + ], + "path": "IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/IV_SWEEP.py", + "selected": false + }, + "position": { + "x": 511.6912461233678, + "y": 5.980216390951398 + }, + "selected": false, + "positionAbsolute": { + "x": 511.6912461233678, + "y": 5.980216390951398 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between 'start' and 'end' with a 'step' number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": 192.47824090745922, + "y": 49.8416165273091 + }, + "selected": false, + "positionAbsolute": { + "x": 192.47824090745922, + "y": 49.8416165273091 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "SCATTER-fee34277-0702-4342-af77-37c9d68701c6", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-fee34277-0702-4342-af77-37c9d68701c6", + "label": "SCATTER", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing the Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 822.0611229804773, + "y": -8.822814846961876 + }, + "selected": false, + "positionAbsolute": { + "x": 822.0611229804773, + "y": -8.822814846961876 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1", + "sourceHandle": "default", + "target": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", + "targetHandle": "default", + "id": "reactflow__edge-OPEN_KEITHLEY_24XX-097d2560-f5b9-468a-9517-32e89dedecc1default-LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28default" + }, + { + "source": "LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28", + "sourceHandle": "default", + "target": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-db9bbe29-66a0-4122-ad24-e3c00b1fba28default-IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7default" + }, + { + "source": "IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7", + "sourceHandle": "default", + "target": "SCATTER-fee34277-0702-4342-af77-37c9d68701c6", + "targetHandle": "default", + "id": "reactflow__edge-IV_SWEEP-41060d63-89ff-46f2-914b-944a11d24ed7default-SCATTER-fee34277-0702-4342-af77-37c9d68701c6default" + } + ], + "viewport": { + "x": 255.10425070720453, + "y": 317.88940714410813, + "zoom": 0.5 + } + } +} \ No newline at end of file diff --git a/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/examples/EX1/example.md b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/examples/EX1/example.md new file mode 100644 index 000000000..00d085c78 --- /dev/null +++ b/docs/nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/examples/EX1/example.md @@ -0,0 +1,25 @@ +--- +title: OPEN_KEITHLEY_24XX +description: In this example, we demonstrate how to record an I"-"V curve using Flojoy, a Keithley 2400 source meter, and a computer. +keyword: [Python, Instrument, Keithley 2400 control, Python instrument integration, Measurement and analysis, Python"-"based instrument control, Keithley instrument control, Enhance measurements with Python, Python"-"based measurement techniques, Streamline instrument usage, Accurate data analysis,Python integration with Keithley 2400] +image: https://raw.githubusercontent.com/flojoy-ai/docs/main/docs/nodes/INSTRUMENTS/KEITHLEY/KEITHLEY2/examples/EX1/output.jpeg +--- + +In this example, we demonstrate how to record an I-V curve using Flojoy, a Keithley2400 source meter, and a computer. Fist you need to connect the Keithley2400 sourcemeter to the computer with a serial communication cable. Then, connect your device (Solar cell in this example) to the sourcemeter. After that you can prepare your flojoy app: + +The [`LINSPACE`](https://github.com/flojoy-io/nodes/blob/main/GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py) node defines the voltage range sent to the electronic device. The user defines the voltage range by setting these parameters with Numeric Input: + +- LINSPACE START: Define your first Voltage. +- LINSPACE END: Define your last Voltage. +- LINSPACE STEP: Define the number of voltages between the first and the last one. + +The [`KEITHLEY2400`](https://github.com/flojoy-io/nodes/blob/main/INSTRUMENTS/KEITHLEY/KEITHLEY2400/KEITHLEY2400.py) node will communicate with the source meter by serial communication to send voltages and measure currents from the device. + +The connection must first be opened using the [`OPEN_KEITHLEY_24XX`](https://github.com/flojoy-io/nodes/blob/main/INSTRUMENTS/KEITHLEY/KEITHLEY2400/KEITHLEY2400.py) node, which has two communication parameters set by the user after connecting the Keithley2400 to their computer: + +- DEVICE: Select the serial device that corresponds to the Keithley2400. +- BAUDRATE: Define the Baud rate of your communication protocol (the default is 9600, the value has to correspond to the Instrument settings). + +The [`LINE`](https://github.com/flojoy-io/nodes/blob/main/VISUALIZERS/PLOTLY/LINE/LINE.py) node will display the I-V curve by plotting the currents received from the device as a function of the voltages transmitted to the device. + +When the setup is ready, and the parameters above are well defined, the experiment can be started by turning on the source meter and clicking the PLAY button. diff --git a/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC/a1-[autogen]/docstring.txt b/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC/a1-[autogen]/docstring.txt index fc690317e..cafc92d37 100644 --- a/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The STEPPER_DRIVER_TIC node controls a stepper motor movement with a TIC driver. +The STEPPER_DRIVER_TIC node controls a stepper motor's movement with a TIC driver. The user defines the speed and the sleep time between movements. diff --git a/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC_KNOB/a1-[autogen]/docstring.txt b/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC_KNOB/a1-[autogen]/docstring.txt index 447ce525e..529afb278 100644 --- a/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC_KNOB/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/MOTION/MOTOR_DRIVER/STEPPER/POLULU/TIC_KNOB/a1-[autogen]/docstring.txt @@ -1,6 +1,6 @@ -The STEPPER_DRIVER_TIC_KNOB controls a stepper motor movement with a TIC driver. +The STEPPER_DRIVER_TIC_KNOB controls a stepper motor's movement with a TIC driver. - The user controls the motor rotation with the knob position in the node's parameters. + The user controls the motor's rotation with the knob position, specified in the node's parameters. Parameters ---------- diff --git a/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/docstring.txt b/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/docstring.txt index a21e3b24a..4796448e8 100644 --- a/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The SERIAL_SINGLE_MEASUREMENT node takes a single reading of data from an Ardunio or a similar serial device. +The SERIAL_SINGLE_MEASUREMENT node takes a single reading of data from an Arduino or a similar serial device. Parameters ---------- diff --git a/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/python_code.txt b/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/python_code.txt index 7bb19b0d2..0b3456111 100644 --- a/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/python_code.txt +++ b/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_SINGLE_MEASUREMENT/a1-[autogen]/python_code.txt @@ -1,4 +1,4 @@ -from flojoy import flojoy, OrderedPair +from flojoy import SerialDevice, flojoy, OrderedPair from typing import Optional import serial import numpy as np @@ -6,13 +6,13 @@ import numpy as np @flojoy(deps={"pyserial": "3.5"}) def SERIAL_SINGLE_MEASUREMENT( + device: SerialDevice, default: Optional[OrderedPair] = None, - comport: str = "/dev/ttyUSB0", baudrate: int = 9600, ) -> OrderedPair: - ser = serial.Serial(comport, timeout=1, baudrate=baudrate) + ser = serial.Serial(device.port, timeout=1, baudrate=baudrate) s = "" while s == "": s = ser.readline().decode() diff --git a/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_TIMESERIES/a1-[autogen]/docstring.txt b/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_TIMESERIES/a1-[autogen]/docstring.txt index 660071c9e..6c0503b23 100644 --- a/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_TIMESERIES/a1-[autogen]/docstring.txt +++ b/docs/nodes/IO/PROTOCOLS/SERIAL/BASIC/SERIAL_TIMESERIES/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The SERIAL_TIMESERIES node extracts simple time-dependent 1D data from an Ardunio or a similar serial device. +The SERIAL_TIMESERIES node extracts simple time-dependent 1D data from an Arduino or a similar serial device. Parameters ---------- diff --git a/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/docstring.txt b/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/docstring.txt index 8ec6490eb..b4e8a6d8d 100644 --- a/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/docstring.txt +++ b/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/docstring.txt @@ -3,24 +3,23 @@ The LOCAL_FILE node loads a local file of a different type and converts it to a Parameters ---------- file_path : str - path to the file to be loaded - default : Optional[TextBlob] - If this input node is connected, the filename will be taken from - the output of the connected node. To be used in conjunction with batch processing - file_type : str - type of file to load, default = image - - Notes - ----- - If both file_path and default are not specified when `file_type="Image"`, a default image will be loaded. + The path to the file to be loaded. This can be either an absolute path or + a path relative to the "nodes" directory. - Raises - ------ - ValueError - If the file path is not specified and the default input is not connected, a ValueError is raised. + default : Optional[TextBlob] + If this input node is connected, the file name will be taken from + the output of the connected node. + To be used in conjunction with batch processing. + file_type : str + Type of file to load, default = image. + If both 'file_path' and 'default' are not specified when 'file_type="Image"', + a default image will be loaded. + If the file path is not specified and the default input is not connected, + a ValueError is raised. Returns ------- - Image|DataFrame - Image for file_type 'image' - DataFrame for file_type 'json', 'csv', 'excel', 'xml' + Image | DataFrame + Image for file_type 'image'. + Grayscale from file_type 'Grayscale'. + DataFrame for file_type 'json', 'csv'. diff --git a/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/python_code.txt b/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/python_code.txt index 6c3e713ac..a7ae3a47c 100644 --- a/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/python_code.txt +++ b/docs/nodes/LOADERS/LOCAL_FILE_SYSTEM/LOCAL_FILE/a1-[autogen]/python_code.txt @@ -2,36 +2,37 @@ from flojoy import flojoy, Image, DataFrame, Grayscale, TextBlob from typing import Literal, Optional import numpy as np from PIL import Image as PIL_Image -from os import path +import os import pandas as pd def get_file_path(file_path: str, default_path: str | None = None): - f_path = path.abspath(file_path) if file_path != "" else default_path + f_path = file_path if file_path != "" else default_path if not f_path: raise ValueError( "The file path of the input file is missing. " "Please provide a input TextBlob or a provide `file_path` with a value!" ) + if not os.path.isabs(f_path): + path_to_nodes = __file__[: __file__.rfind("nodes") + 5] + return os.path.abspath(os.path.join(path_to_nodes, f_path)) return f_path @flojoy( deps={ - "xlrd": "2.0.1", - "lxml": "4.9.2", - "openpyxl": "3.0.10", "scikit-image": "0.21.0", } ) def LOCAL_FILE( - file_path: str = None, + file_path: str | None = None, default: Optional[TextBlob] = None, - file_type: Literal["Image", "Grayscale", "JSON", "CSV", "Excel", "XML"] = "Image", -) -> Image | DataFrame: + file_type: Literal["Image", "Grayscale", "JSON", "CSV"] = "Image", +) -> Image | DataFrame | Grayscale: - default_image_path = path.join( - path.dirname(path.abspath(__file__)), + + default_image_path = os.path.join( + os.path.dirname(os.path.abspath(__file__)), "assets", "astronaut.png", ) @@ -70,11 +71,12 @@ def LOCAL_FILE( file_path = get_file_path(file_path) df = pd.read_json(file_path) return DataFrame(df=df) - case "XML": - file_path = get_file_path(file_path) - df = pd.read_xml(file_path) - return DataFrame(df=df) - case "Excel": - file_path = get_file_path(file_path) - df = pd.read_excel(file_path) - return DataFrame(df=df) + # TODO: we might add support for following file types later + # case "XML": + # file_path = get_file_path(file_path) + # df = pd.read_xml(file_path) + # return DataFrame(df=df) + # case "Excel": + # file_path = get_file_path(file_path) + # df = pd.read_excel(file_path) + # return DataFrame(df=df) diff --git a/docs/nodes/LOADERS/REMOTE_FILE_SYSTEM/REMOTE_FILE/a1-[autogen]/docstring.txt b/docs/nodes/LOADERS/REMOTE_FILE_SYSTEM/REMOTE_FILE/a1-[autogen]/docstring.txt index 3ad916105..f58d91c47 100644 --- a/docs/nodes/LOADERS/REMOTE_FILE_SYSTEM/REMOTE_FILE/a1-[autogen]/docstring.txt +++ b/docs/nodes/LOADERS/REMOTE_FILE_SYSTEM/REMOTE_FILE/a1-[autogen]/docstring.txt @@ -1,30 +1,24 @@ The REMOTE_FILE node loads a remote file using an HTTP URL and converts it to a DataContainer class. + Note: If both the file_url and default are not specified when file_type="Image", a default image will be loaded. + + For now, REMOTE_FILE only supports HTTP file URLs, in particular GCP URL (starting with gcp://). S3 URL (starting with s3://) and other bucket-like URLs are not supported. + + If the file url is not specified and the default input is not connected, or if the file url is not a valid URL, a ValueError is raised. + Parameters ---------- file_url : str - URL the file to be loaded - default : Optional[TextBlob] + URL of the file to be loaded. + default : Optional[TextBlob] If this input node is connected, the file URL will be taken from - the output of the connected node. To be used in conjunction with batch processing + the output of the connected node. + To be used in conjunction with batch processing. file_type : str - type of file to load, default = image - - Notes - ----- - If both file_url and default are not specified when `file_type="Image"`, a default image will be loaded. - - REMOTE_FILE for now only supports HTTP file URLs, in particular GCP URL (starting with `gcp://`), - S3 URL (starting with `s3://`) and other bucket-like URLs are not supported. - - Raises - ------ - ValueError - If the file url is not specified and the default input is not connected, a ValueError is raised. - If the file url is not a valid URL, a ValueError is raised. + Type of file to load, default = image. Returns ------- Image|DataFrame - Image for file_type 'image' - DataFrame for file_type 'json', 'csv', 'excel', 'xml' + Image for file_type 'image'. + DataFrame for file_type 'json', 'csv', 'excel', 'xml'. diff --git a/docs/nodes/NUMPY/LINALG/EIG/a1-[autogen]/docstring.txt b/docs/nodes/NUMPY/LINALG/EIG/a1-[autogen]/docstring.txt index a24160ea0..62fae98ac 100644 --- a/docs/nodes/NUMPY/LINALG/EIG/a1-[autogen]/docstring.txt +++ b/docs/nodes/NUMPY/LINALG/EIG/a1-[autogen]/docstring.txt @@ -1,19 +1,18 @@ - The EIG node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the eigenvalues and right eigenvectors of a square array. + Compute the eigenvalues and right eigenvectors of a square array. -Parameters ----------- -select_return : This function has returns for multiple objects ['w', 'v']. - Select the desired one to return. - See the respective function docs for descriptors. -a : (..., M, M) array - Matrices for which the eigenvalues and right eigenvectors will be computed. + Parameters + ---------- + select_return : 'w', 'v' + Select the desired object to return. + See the respective function docs for descriptors. + a : (..., M, M) array + Matrices for which the eigenvalues and right eigenvectors will be computed. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/NUMPY/LINALG/PINV/a1-[autogen]/docstring.txt b/docs/nodes/NUMPY/LINALG/PINV/a1-[autogen]/docstring.txt index 1133c2f05..9d43a2fd1 100644 --- a/docs/nodes/NUMPY/LINALG/PINV/a1-[autogen]/docstring.txt +++ b/docs/nodes/NUMPY/LINALG/PINV/a1-[autogen]/docstring.txt @@ -1,31 +1,30 @@ - The PINV node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the (Moore-Penrose) pseudo-inverse of a matrix. + Compute the (Moore-Penrose) pseudo-inverse of a matrix. - Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all *large* singular values. + Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all **large** singular values. -.. versionchanged:: 1.14 - Can now operate on stacks of matrices + .. versionchanged:: 1.14 + Can now operate on stacks of matrices -Parameters ----------- -a : (..., M, N) array_like - Matrix or stack of matrices to be pseudo-inverted. -rcond : (...) array_like of float - Cutoff for small singular values. - Singular values less than or equal to "rcond * largest_singular_value" are set to zero. - Broadcasts against the stack of matrices. -hermitian : bool, optional - If True, "a" is assumed to be Hermitian (symmetric if real-valued), enabling a more - efficient method for finding singular values. - Defaults to False. + Parameters + ---------- + a : (..., M, N) array_like + Matrix or stack of matrices to be pseudo-inverted. + rcond : (...) array_like of float + Cutoff for small singular values. + Singular values less than or equal to "rcond * largest_singular_value" are set to zero. + Broadcasts against the stack of matrices. + hermitian : bool, optional + If True, "a" is assumed to be Hermitian (symmetric if real-valued), enabling a more + efficient method for finding singular values. + Defaults to False. -.. versionadded:: 1.17.0 + .. versionadded:: 1.17.0 -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/NUMPY/LINALG/QR/a1-[autogen]/docstring.txt b/docs/nodes/NUMPY/LINALG/QR/a1-[autogen]/docstring.txt index c9b39e193..82e80bffc 100644 --- a/docs/nodes/NUMPY/LINALG/QR/a1-[autogen]/docstring.txt +++ b/docs/nodes/NUMPY/LINALG/QR/a1-[autogen]/docstring.txt @@ -1,35 +1,33 @@ - The QR node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the qr factorization of a matrix. + Compute the qr factorization of a matrix. - Factor the matrix 'a' as *qr*, where 'q' is orthonormal and 'r' is upper-triangular. + Factor the matrix 'a' as *qr*, where 'q' is orthonormal and 'r' is upper-triangular. -Parameters ----------- -select_return : This function has returns for multiple objects ['q', 'r', '(h, tau)']. - Select the desired one to return. - See the respective function docs for descriptors. -a : array_like, shape (..., M, N) - An array-like object with the dimensionality of at least 2. -mode : {'reduced', 'complete', 'r', 'raw'}, optional - If K = min(M, N), then: - 'reduced' : returns q, r with dimensions (..., M, K), (..., K, N) (default) - 'complete' : returns q, r with dimensions (..., M, M), (..., M, N) - 'r' : returns r only with dimensions (..., K, N) - 'raw' : returns h, tau with dimensions (..., N, M), (..., K,) + For the 'mode' parameters, the options 'reduced', 'complete, and 'raw' are new in numpy 1.8 (see the notes for more information). + The default is 'reduced', and to maintain backward compatibility with earlier versions of numpy, both it and the old default 'full' can be omitted. + Note that array h returned in 'raw' mode is transposed for calling Fortran. + The 'economic' mode is deprecated. + The modes 'full' and 'economic' may be passed using only the first letter for backwards compatibility, + but all others must be spelled out (see the Notes for further explanation). - The options 'reduced', 'complete, and 'raw' are new in numpy 1.8 (see the notes for more information). - The default is 'reduced', and to maintain backward compatibility with earlier versions of numpy, - both it and the old default 'full' can be omitted. - Note that array h returned in 'raw' mode is transposed for calling Fortran. - The 'economic' mode is deprecated. - The modes 'full' and 'economic' may be passed using only the first letter for backwards compatibility, - but all others must be spelled out (see the Notes for further explanation). + Parameters + ---------- + select_return : 'q', 'r', '(h, tau)' + Select the desired opject to return. + See the respective function docs for descriptors. + a : array_like, shape (..., M, N) + An array-like object with the dimensionality of at least 2. + mode : {'reduced', 'complete', 'r', 'raw'}, optional + If K = min(M, N), then: + 'reduced' : returns q, r with dimensions (..., M, K), (..., K, N) (default) + 'complete' : returns q, r with dimensions (..., M, M), (..., M, N) + 'r' : returns r only with dimensions (..., K, N) + 'raw' : returns h, tau with dimensions (..., N, M), (..., K,) -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/NUMPY/LINALG/SLOGDET/a1-[autogen]/docstring.txt b/docs/nodes/NUMPY/LINALG/SLOGDET/a1-[autogen]/docstring.txt index ef2809663..2bbbb0273 100644 --- a/docs/nodes/NUMPY/LINALG/SLOGDET/a1-[autogen]/docstring.txt +++ b/docs/nodes/NUMPY/LINALG/SLOGDET/a1-[autogen]/docstring.txt @@ -1,23 +1,22 @@ - The SLOGDET node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the sign and (natural) logarithm of the determinant of an array. + Compute the sign and (natural) logarithm of the determinant of an array. - If an array has a very small or very large determinant, then a call to 'det' may overflow or underflow. + If an array has a very small or very large determinant, then a call to 'det' may overflow or underflow. - This routine is more robust against such issues, because it computes the logarithm of the determinant rather than the determinant itself. + This routine is more robust against such issues, because it computes the logarithm of the determinant rather than the determinant itself. -Parameters ----------- -select_return : This function has returns multiple objects []'sign', 'logdet']. - Select the desired one to return. - See the respective function documents for descriptors. -a : (..., M, M) array_like - Input array, has to be a square 2-D array. + Parameters + ---------- + select_return : 'sign', 'logdet' + Select the desired object to return. + See the respective function documents for descriptors. + a : (..., M, M) array_like + Input array, has to be a square 2-D array. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/NUMPY/LINALG/SVD/a1-[autogen]/docstring.txt b/docs/nodes/NUMPY/LINALG/SVD/a1-[autogen]/docstring.txt index 92f714980..1b4ab1b84 100644 --- a/docs/nodes/NUMPY/LINALG/SVD/a1-[autogen]/docstring.txt +++ b/docs/nodes/NUMPY/LINALG/SVD/a1-[autogen]/docstring.txt @@ -1,35 +1,34 @@ - The SVD node is based on a numpy or scipy function. -The description of that function is as follows: - - Singular Value Decomposition. - - When 'a' is a 2D array, and "full_matrices=False", then it is factorized as "u @ np.diag(s) @ vh = (u * s) @ vh", - where 'u' and the Hermitian transpose of 'vh' are 2D arrays with orthonormal columns and 's' is a 1D array of 'a' singular values. - - When 'a' is higher-dimensional, SVD is applied in stacked mode as explained below. - -Parameters ----------- -select_return : This function has returns multiple objects ['u', 's', 'vh']. - Select the desired one to return. - See the respective function docs for descriptors. -a : (..., M, N) array_like - A real or complex array with "a.ndim >= 2". -full_matrices : bool, optional - If True (default), 'u' and 'vh' have the shapes "(..., M, M)" and "(..., N, N)", respectively. - Otherwise, the shapes are "(..., M, K)" and "(..., K, N)", respectively, where "K = min(M, N)". -compute_uv : bool, optional - Whether or not to compute 'u' and 'vh' in addition to 's'. - True by default. -hermitian : bool, optional - If True, 'a' is assumed to be Hermitian (symmetric if real-valued), enabling a more efficient method for finding singular values. - Defaults to False. - -.. versionadded:: 1.17.0 - -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + The description of that function is as follows: + + Singular Value Decomposition. + + When 'a' is a 2D array, and "full_matrices=False", then it is factorized as "u @ np.diag(s) @ vh = (u * s) @ vh", + where 'u' and the Hermitian transpose of 'vh' are 2D arrays with orthonormal columns and 's' is a 1D array of 'a' singular values. + + When 'a' is higher-dimensional, SVD is applied in stacked mode as explained below. + + Parameters + ---------- + select_return : 'u', 's', 'vh' + Select the desired object to return. + See the respective function docs for descriptors. + a : (..., M, N) array_like + A real or complex array with "a.ndim >= 2". + full_matrices : bool, optional + If True (default), 'u' and 'vh' have the shapes "(..., M, M)" and "(..., N, N)", respectively. + Otherwise, the shapes are "(..., M, K)" and "(..., K, N)", respectively, where "K = min(M, N)". + compute_uv : bool, optional + Whether or not to compute 'u' and 'vh' in addition to 's'. + True by default. + hermitian : bool, optional + If True, 'a' is assumed to be Hermitian (symmetric if real-valued), enabling a more efficient method for finding singular values. + Defaults to False. + + .. versionadded:: 1.17.0 + + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/SIGNAL/ARGRELMAX/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/SIGNAL/ARGRELMAX/a1-[autogen]/docstring.txt index c7760fde4..825a6dc1c 100644 --- a/docs/nodes/SCIPY/SIGNAL/ARGRELMAX/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/SIGNAL/ARGRELMAX/a1-[autogen]/docstring.txt @@ -1,25 +1,25 @@ - The ARGRELMAX node is based on a numpy or scipy function. -The description of that function is as follows: - Calculate the relative maxima of `data`. + The description of that function is as follows: + + Calculate the relative maxima of 'data'. -Parameters ----------- -data : ndarray - Array in which to find the relative maxima. -axis : int, optional - Axis over which to select from 'data'. Default is 0. -order : int, optional - How many points on each side to use for the comparison - to consider "comparator(n, n+x)" to be True. -mode : str, optional - How the edges of the vector are treated. - Available options are 'wrap' (wrap around) or 'clip' (treat overflow - as the same as the last (or first) element). - Default 'clip'. See numpy.take. + Parameters + ---------- + data : ndarray + Array in which to find the relative maxima. + axis : int, optional + Axis over which to select from 'data'. Default is 0. + order : int, optional + How many points on each side to use for the comparison + to consider "comparator(n, n+x)" to be True. + mode : str, optional + How the edges of the vector are treated. + Available options are 'wrap' (wrap around) or 'clip' (treat overflow + as the same as the last (or first) element). + Default 'clip'. See numpy.take. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/SIGNAL/DETREND/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/SIGNAL/DETREND/a1-[autogen]/docstring.txt index 3a1f8f402..ded390873 100644 --- a/docs/nodes/SCIPY/SIGNAL/DETREND/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/SIGNAL/DETREND/a1-[autogen]/docstring.txt @@ -1,30 +1,30 @@ - The DETREND node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Remove linear trend along axis from data. + Remove a linear trend along an axis from data. -Parameters ----------- -data : array_like - The input data. -axis : int, optional - The axis along which to detrend the data. By default this is the - last axis (-1). -type : {'linear', 'constant'}, optional - The type of detrending. If type == 'linear' (default), - the result of a linear least-squares fit to 'data' is subtracted from 'data'. - If type == 'constant', only the mean of 'data' is subtracted. -bp : array_like of ints, optional - A sequence of break points. If given, an individual linear fit is - performed for each part of 'data' between two break points. - Break points are specified as indices into 'data'. This parameter - only has an effect when type == 'linear'. -overwrite_data : bool, optional - If True, perform in place detrending and avoid a copy. Default is False. + Parameters + ---------- + data : array_like + The input data. + axis : int, optional + The axis along which to detrend the data. + By default this is the last axis (-1). + type : {'linear', 'constant'}, optional + The type of detrending. If type == 'linear' (default), + the result of a linear least-squares fit to 'data' is subtracted from 'data'. + If type == 'constant', only the mean of 'data' is subtracted. + bp : array_like of ints, optional + A sequence of break points. If given, an individual linear fit is + performed for each part of 'data' between two break points. + Break points are specified as indices into 'data'. + This parameter only has an effect when type == 'linear'. + overwrite_data : bool, optional + If True, perform in place detrending and avoid a copy. + Default is False. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/SIGNAL/PERIODOGRAM/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/SIGNAL/PERIODOGRAM/a1-[autogen]/docstring.txt index 6d6ef59f8..1751e5dde 100644 --- a/docs/nodes/SCIPY/SIGNAL/PERIODOGRAM/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/SIGNAL/PERIODOGRAM/a1-[autogen]/docstring.txt @@ -1,48 +1,53 @@ - The PERIODOGRAM node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Estimate power spectral density using a periodogram. + Estimate power spectral density using a periodogram. -Parameters ----------- -select_return : This function has returns multiple objects ['f', 'Pxx']. - Select the desired one to return. - See the respective function docs for descriptors. -x : array_like - Time series of measurement values. -fs : float, optional - Sampling frequency of the 'x' time series. Defaults to 1.0. -window : str or tuple or array_like, optional - Desired window to use. If 'window' is a string or tuple, it is - passed to 'get_window' to generate the window values, which are - DFT-even by default. See 'get_window' for a list of windows and - required parameters. If 'window' is array_like it will be used - directly as the window and its length must be nperseg. - Defaults to 'boxcar'. -nfft : int, optional - Length of the FFT used. If 'None' the length of 'x' will be used. -detrend : str or function or 'False', optional - Specifies how to detrend each segment. If 'detrend' is a - string, it is passed as the 'type' argument to the 'detrend' function. - If it is a function, it takes a segment and returns a - detrended segment. If 'detrend' is 'False', no detrending is done. - Defaults to 'constant'. -return_onesided : bool, optional - If 'True', return a one-sided spectrum for real data. - If 'False' return a two-sided spectrum. Defaults to 'True', but for - complex data, a two-sided spectrum is always returned. -scaling : { 'density', 'spectrum' }, optional - Selects between computing the power spectral density ('density') - where 'Pxx' has units of V**2/Hz and computing the power - spectrum ('spectrum') where 'Pxx' has units of V**2, if 'x' - is measured in V and 'fs' is measured in Hz. Defaults to 'density'. -axis : int, optional - Axis along which the periodogram is computed; the default is - over the last axis (i.e. axis=-1). + Parameters + ---------- + select_return : 'f', 'Pxx'. + Select the desired object to return. + See the respective function docs for descriptors. + x : array_like + Time series of measurement values. + fs : float, optional + Sampling frequency of the 'x' time series. + Defaults to 1.0. + window : str or tuple or array_like, optional + Desired window to use. + If 'window' is a string or tuple, it is passed to 'get_window' to + generate the window values, which are DFT-even by default. + See 'get_window' for a list of windows and required parameters. + If 'window' is array_like, it will be used directly as the window + and its length must be nperseg. + Defaults to 'boxcar'. + nfft : int, optional + Length of the FFT used. + If 'None', the length of 'x' will be used. + detrend : str or function or 'False', optional + Specifies how to detrend each segment. + If 'detrend' is a string, it is passed as the 'type' argument + to the 'detrend' function. + If it is a function, it takes a segment and returns a detrended segment. + If 'detrend' is 'False', no detrending is done. + Defaults to 'constant'. + return_onesided : bool, optional + If 'True', return a one-sided spectrum for real data. + If 'False', return a two-sided spectrum. + Defaults to 'True', but for complex data, + a two-sided spectrum is always returned. + scaling : { 'density', 'spectrum' }, optional + Selects between computing the power spectral density ('density') + where 'Pxx' has units of V**2/Hz and computing the power + spectrum ('spectrum') where 'Pxx' has units of V**2, if 'x' + is measured in V and 'fs' is measured in Hz. + Defaults to 'density'. + axis : int, optional + Axis along which the periodogram is computed; + the default is over the last axis (i.e. axis=-1). -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/SIGNAL/SAVGOL_FILTER/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/SIGNAL/SAVGOL_FILTER/a1-[autogen]/docstring.txt index fd7d28fb4..4b998c4fd 100644 --- a/docs/nodes/SCIPY/SIGNAL/SAVGOL_FILTER/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/SIGNAL/SAVGOL_FILTER/a1-[autogen]/docstring.txt @@ -1,48 +1,48 @@ - The SAVGOL_FILTER node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Apply a Savitzky-Golay filter to an array. + Apply a Savitzky-Golay filter to an array. - This is a 1-D filter. If 'x' has dimension greater than 1, 'axis' determines the axis along which the filter is applied. + This is a 1-D filter. If 'x' has a dimension greater than 1, 'axis' determines the axis along which the filter is applied. -Parameters ----------- -x : array_like - The data to be filtered. If 'x' is not a single or double precision - floating point array, it will be converted to type numpy.float64 before filtering. -window_length : int - The length of the filter window (i.e., the number of coefficients). - If 'mode' is 'interp', 'window_length' must be less than or equal to the size of 'x'. -polyorder : int - The order of the polynomial used to fit the samples. - 'polyorder' must be less than 'window_length'. -deriv : int, optional - The order of the derivative to compute. This must be a - nonnegative integer. The default is 0, which means to filter - the data without differentiating. -delta : float, optional - The spacing of the samples to which the filter will be applied. - This is only used if deriv > 0. Default is 1.0. -axis : int, optional - The axis of the array 'x' along which the filter is to be applied. - Default is -1. -mode : str, optional - Must be 'mirror', 'constant', 'nearest', 'wrap' or 'interp'. This - determines the type of extension to use for the padded signal to - which the filter is applied. When 'mode' is 'constant', the padding - value is given by 'cval'. See the Notes for more details on 'mirror', - 'constant', 'wrap', and 'nearest'. - When the 'interp' mode is selected (the default), no extension - is used. Instead, a degree 'polyorder' polynomial is fit to the - last 'window_length' values of the edges, and this polynomial is - used to evaluate the last 'window_length // 2' output values. -cval : scalar, optional - Value to fill past the edges of the input if 'mode' is 'constant'. - Default is 0.0. + Parameters + ---------- + x : array_like + The data to be filtered. + If 'x' is not a single or double precision floating point array, + it will be converted to type numpy.float64 before filtering. + window_length : int + The length of the filter window (i.e., the number of coefficients). + If 'mode' is 'interp', 'window_length' must be less than or equal to the size of 'x'. + polyorder : int + The order of the polynomial used to fit the samples. + 'polyorder' must be less than 'window_length'. + deriv : int, optional + The order of the derivative to compute. + This must be a nonnegative integer. + The default is 0, which means to filter the data without differentiating. + delta : float, optional + The spacing of the samples to which the filter will be applied. + This is only used if deriv > 0. Default is 1.0. + axis : int, optional + The axis of the array 'x' along which the filter is to be applied. + Default is -1. + mode : str, optional + Must be 'mirror', 'constant', 'nearest', 'wrap' or 'interp'. + This determines the type of extension to use for the padded signal to + which the filter is applied. + When 'mode' is 'constant', the padding value is given by 'cval'. + See the Notes for more details on 'mirror', 'constant', 'wrap', and 'nearest'. + When the 'interp' mode is selected (the default), no extension is used. + Instead, a degree 'polyorder' polynomial is fit to the last + 'window_length' values of the edges, and this polynomial is + used to evaluate the last 'window_length // 2' output values. + cval : scalar, optional + Value to fill past the edges of the input if 'mode' is 'constant'. + Default is 0.0. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/SIGNAL/STFT/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/SIGNAL/STFT/a1-[autogen]/docstring.txt index 175101c63..507217444 100644 --- a/docs/nodes/SCIPY/SIGNAL/STFT/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/SIGNAL/STFT/a1-[autogen]/docstring.txt @@ -1,75 +1,79 @@ - The STFT node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the Short Time Fourier Transform (STFT). + Compute the Short Time Fourier Transform (STFT). - STFTs can be used as a way of quantifying the change of a nonstationary signal's frequency and phase content over time. + STFTs can be used as a way of quantifying the change of a nonstationary signal's frequency and phase content over time. -Parameters ----------- -select_return : This function has returns multiple objects []'f', 't', 'Zxx']. - Select the desired one to return. - See the respective function docs for descriptors. -x : array_like - Time series of measurement values -fs : float, optional - Sampling frequency of the 'x' time series. Defaults to 1.0. -window : str or tuple or array_like, optional - Desired window to use. If 'window' is a string or tuple, it is - passed to 'get_window' to generate the window values, which are - DFT-even by default. See 'get_window' for a list of windows and - required parameters. If 'window' is array_like it will be used - directly as the window and its length must be nperseg. Defaults - to a Hann window. -nperseg : int, optional - Length of each segment. Defaults to 256. -noverlap : int, optional - Number of points to overlap between segments. If 'None', - noverlap = nperseg // 2. Defaults to 'None'. When - specified, the COLA constraint must be met (see Notes below). -nfft : int, optional - Length of the FFT used, if a zero padded FFT is desired. If - 'None', the FFT length is 'nperseg'. Defaults to 'None'. -detrend : str or function or 'False', optional - Specifies how to detrend each segment. If 'detrend' is a - string, it is passed as the 'type' argument to the 'detrend' - function. If it is a function, it takes a segment and returns a - detrended segment. If 'detrend' is 'False', no detrending is - done. Defaults to 'False'. -return_onesided : bool, optional - If 'True', return a one-sided spectrum for real data. - If 'False' return a two-sided spectrum. Defaults to 'True', but for - complex data, a two-sided spectrum is always returned. -boundary : str or None, optional - Specifies whether the input signal is extended at both ends, and - how to generate the new values, in order to center the first - windowed segment on the first input point. This has the benefit - of enabling reconstruction of the first input point when the - employed window function starts at zero. Valid options are - ['even', 'odd', 'constant', 'zeros', None]. Defaults to - 'zeros', for zero padding extension. I.e. [1, 2, 3, 4] is - extended to [0, 1, 2, 3, 4, 0] for nperseg=3. -padded : bool, optional - Specifies whether the input signal is zero-padded at the end to - make the signal fit exactly into an integer number of window - segments, so that all of the signal is included in the output. - Defaults to 'True'. Padding occurs after boundary extension, if - 'boundary' is not 'None', and 'padded' is 'True', as is the - default. -axis : int, optional - Axis along which the STFT is computed; the default is over the - last axis (i.e. axis=-1). -scaling: {'spectrum', 'psd'} - The default 'spectrum' scaling allows each frequency line of 'Zxx' to - be interpreted as a magnitude spectrum. The 'psd' option scales each - line to a power spectral density - it allows to calculate the signal's - energy by numerically integrating over abs(Zxx)**2. + Parameters + ---------- + select_return : 'f', 't', 'Zxx' + Select the desired object to return. + See the respective function docs for descriptors. + x : array_like + Time series of measurement values. + fs : float, optional + Sampling frequency of the 'x' time series. + Defaults to 1.0. + window : str or tuple or array_like, optional + Desired window to use. + If 'window' is a string or tuple, it is passed to 'get_window' + to generate the window values, which are DFT-even by default. + See 'get_window' for a list of windows and required parameters. + If 'window' is array_like it will be used directly as the window + and its length must be nperseg. + Defaults to a Hann window. + nperseg : int, optional + Length of each segment. + Defaults to 256. + noverlap : int, optional + Number of points to overlap between segments. + If 'None', noverlap = nperseg // 2. + Defaults to 'None'. + When specified, the COLA constraint must be met (see Notes below). + nfft : int, optional + Length of the FFT used, if a zero padded FFT is desired. + If 'None', the FFT length is 'nperseg'. + Defaults to 'None'. + detrend : str or function or 'False', optional + Specifies how to detrend each segment. + If 'detrend' is a string, it is passed as the 'type' argument to the 'detrend' function. + If it is a function, it takes a segment and returns a detrended segment. + If 'detrend' is 'False', no detrending is done. + Defaults to 'False'. + return_onesided : bool, optional + If 'True', return a one-sided spectrum for real data. + If 'False' return a two-sided spectrum. + Defaults to 'True', but for complex data, a two-sided spectrum is always returned. + boundary : str or None, optional + Specifies whether the input signal is extended at both ends, and + how to generate the new values, in order to center the first + windowed segment on the first input point. + This has the benefit of enabling reconstruction of the first input point + when the employed window function starts at zero. + Valid options are ['even', 'odd', 'constant', 'zeros', None]. + Defaults to 'zeros', for zero padding extension. + I.e. [1, 2, 3, 4] is extended to [0, 1, 2, 3, 4, 0] for nperseg=3. + padded : bool, optional + Specifies whether the input signal is zero-padded at the end to + make the signal fit exactly into an integer number of window + segments, so that all of the signal is included in the output. + Defaults to 'True'. + Padding occurs after boundary extension, if 'boundary' is not 'None', + and 'padded' is 'True', as is the default. + axis : int, optional + Axis along which the STFT is computed. + The default is over the last axis (i.e. axis=-1). + scaling: {'spectrum', 'psd'} + The default 'spectrum' scaling allows each frequency line of 'Zxx' to + be interpreted as a magnitude spectrum. + The 'psd' option scales each line to a power spectral density. + It allows to calculate the signal's energy by numerically integrating over abs(Zxx)**2. -.. versionadded:: 1.9.0 + .. versionadded:: 1.9.0 -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/SIGNAL/WELCH/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/SIGNAL/WELCH/a1-[autogen]/docstring.txt index ed84d832c..70611ea42 100644 --- a/docs/nodes/SCIPY/SIGNAL/WELCH/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/SIGNAL/WELCH/a1-[autogen]/docstring.txt @@ -1,64 +1,68 @@ - The WELCH node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Estimate power spectral density using Welch's method. + Estimate power spectral density using Welch's method. - Welch's method [1]_ computes an estimate of the power spectral density by dividing the data into overlapping segments, - computing a modified periodogram for each segment, and averaging the periodograms. + Welch's method [1]_ computes an estimate of the power spectral density by dividing the data into overlapping segments, + computing a modified periodogram for each segment, and averaging the periodograms. -Parameters ----------- -select_return : This function has returns multiple objects ['f', 'Pxx']. - Select the desired one to return. - See the respective function docs for descriptors. -x : array_like - Time series of measurement values -fs : float, optional - Sampling frequency of the 'x' time series. Defaults to 1.0. -window : str or tuple or array_like, optional - Desired window to use. If 'window' is a string or tuple, it is - passed to 'get_window' to generate the window values, which are - DFT-even by default. See 'get_window' for a list of windows and - required parameters. If 'window' is array_like it will be used - directly as the window and its length must be nperseg. Defaults - to a Hann window. -nperseg : int, optional - Length of each segment. Defaults to None, but if window is str or - tuple, is set to 256, and if window is array_like, is set to the - length of the window. -noverlap : int, optional - Number of points to overlap between segments. If 'None', - noverlap = nperseg // 2. Defaults to 'None'. -nfft : int, optional - Length of the FFT used, if a zero padded FFT is desired. - If 'None', the FFT length is 'nperseg'. Defaults to 'None'. -detrend : str or function or 'False', optional - Specifies how to detrend each segment. If 'detrend' is a - string, it is passed as the 'type' argument to the 'detrend' - function. If it is a function, it takes a segment and returns a - detrended segment. If 'detrend' is 'False', no detrending is - done. Defaults to 'constant'. -return_onesided : bool, optional - If 'True', return a one-sided spectrum for real data. If - 'False' return a two-sided spectrum. Defaults to 'True', but for - complex data, a two-sided spectrum is always returned. -scaling : { 'density', 'spectrum' }, optional - Selects between computing the power spectral density ('density') - where 'Pxx' has units of V**2/Hz and computing the power - spectrum ('spectrum') where 'Pxx' has units of V**2, if 'x' - is measured in V and 'fs' is measured in Hz. Defaults to - 'density' -axis : int, optional - Axis along which the periodogram is computed; the default is - over the last axis (i.e. axis=-1). -average : { 'mean', 'median' }, optional - Method to use when averaging periodograms. Defaults to 'mean'. + Parameters + ---------- + select_return : 'f', 'Pxx' + Select the desired object to return. + See the respective function docs for descriptors. + x : array_like + Time series of measurement values. + fs : float, optional + Sampling frequency of the 'x' time series. + Defaults to 1.0. + window : str or tuple or array_like, optional + Desired window to use. If 'window' is a string or tuple, it is + passed to 'get_window' to generate the window values, which are + DFT-even by default. + See 'get_window' for a list of windows and required parameters. + If 'window' is array_like,it will be used directly as the window + and its length must be nperseg. + Defaults to a Hann window. + nperseg : int, optional + Length of each segment. + Defaults to None, but if window is str or tuple, is set to 256, + and if window is array_like, is set to the length of the window. + noverlap : int, optional + Number of points to overlap between segments. + If 'None', noverlap = nperseg // 2. + Defaults to 'None'. + nfft : int, optional + Length of the FFT used, if a zero padded FFT is desired. + If 'None', the FFT length is 'nperseg'. + Defaults to 'None'. + detrend : str or function or 'False', optional + Specifies how to detrend each segment. + If 'detrend' is a string, it is passed as the 'type' argument to the 'detrend' function. + If it is a function, it takes a segment and returns a detrended segment. + If 'detrend' is 'False', no detrending is done. + Defaults to 'constant'. + return_onesided : bool, optional + If 'True', returns a one-sided spectrum for real data. + If 'False', returns a two-sided spectrum. + Defaults to 'True', but for complex data, a two-sided spectrum is always returned. + scaling : { 'density', 'spectrum' }, optional + Selects between computing the power spectral density ('density') + where 'Pxx' has units of V**2/Hz and computing the power + spectrum ('spectrum') where 'Pxx' has units of V**2, if 'x' + is measured in V and 'fs' is measured in Hz. + Defaults to 'density'. + axis : int, optional + Axis along which the periodogram is computed. + The default is over the last axis (i.e. axis=-1). + average : { 'mean', 'median' }, optional + Method to use when averaging periodograms. + Defaults to 'mean'. -.. versionadded:: 1.2.0 + .. versionadded:: 1.2.0 -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/JARQUE_BERA/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/JARQUE_BERA/a1-[autogen]/docstring.txt index 979d13f38..f6bb41fcd 100644 --- a/docs/nodes/SCIPY/STATS/JARQUE_BERA/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/JARQUE_BERA/a1-[autogen]/docstring.txt @@ -1,23 +1,22 @@ - The JARQUE_BERA node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Perform the Jarque-Bera goodness of fit test on sample data. + Perform the Jarque-Bera goodness of fit test on sample data. - The Jarque-Bera test tests whether the sample data has the skewness and kurtosis matching a normal distribution. + The Jarque-Bera test tests whether the sample data has the skewness and kurtosis matching a normal distribution. - Note that this test only works for a large enough number of data samples (>2000) as the test statistic asymptotically has a Chi-squared distribution with 2 degrees of freedom. + Note that this test only works for a large enough number of data samples (>2000) as the test statistic asymptotically has a Chi-squared distribution with 2 degrees of freedom. -Parameters ----------- -select_return : This function has returns multiple objects ['jb_value', 'p']. - Select the desired one to return. - See the respective function docs for descriptors. -x : array_like - Observations of a random variable. + Parameters + ---------- + select_return : 'jb_value', 'p' + Select the desired object to return. + See the respective function docs for descriptors. + x : array_like + Observations of a random variable. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/MVSDIST/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/MVSDIST/a1-[autogen]/docstring.txt index d3a7d2d4d..668623b45 100644 --- a/docs/nodes/SCIPY/STATS/MVSDIST/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/MVSDIST/a1-[autogen]/docstring.txt @@ -1,20 +1,19 @@ - The MVSDIST node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - 'Frozen' distributions for mean, variance, and standard deviation of data. + 'Frozen' distributions for mean, variance, and standard deviation of data. -Parameters ----------- -select_return : This function has returns multiple Objects ['mdist', 'vdist', 'sdist']. - Select the desired one to return. - See the respective function docs for descriptors. -data : array_like - Input array. Converted to 1-D using ravel. - Requires 2 or more data-points. + Parameters + ---------- + select_return : 'mdist', 'vdist', 'sdist' + Select the desired object to return. + See the respective function docs for descriptors. + data : array_like + Input array. Converted to 1-D using ravel. + Requires 2 or more data-points. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/NORMALTEST/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/NORMALTEST/a1-[autogen]/docstring.txt index bcacd30ec..88f4df63e 100644 --- a/docs/nodes/SCIPY/STATS/NORMALTEST/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/NORMALTEST/a1-[autogen]/docstring.txt @@ -1,31 +1,31 @@ - The NORMALTEST node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Test whether a sample differs from a normal distribution. + Test whether a sample differs from a normal distribution. - This function tests the null hypothesis that a sample comes from a normal distribution. - It is based on D'Agostino and Pearson's [1]_, [2]_ test that combines skew and kurtosis to produce an omnibus test of normality. + This function tests the null hypothesis that a sample comes from a normal distribution. + It is based on D'Agostino and Pearson's [1]_, [2]_ test that combines skewness and kurtosis to produce an omnibus test of normality. -Parameters ----------- -select_return : This function has returns multiple objects ['statistic', 'pvalue']. - Select the desired one to return. - See the respective function docs for descriptors. -a : array_like - The array containing the sample to be tested. -axis : int or None, optional - Axis along which to compute test. Default is 0. - If None, compute over the whole array 'a'. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. - The following options are available (default is 'propagate'): - 'propagate' : returns nan - 'raise' : throws an error - 'omit' : performs the calculations ignoring nan values + Parameters + ---------- + select_return : 'statistic', 'pvalue' + Select the desired object to return. + See the respective function docs for descriptors. + a : array_like + The array containing the sample to be tested. + axis : int or None, optional + Axis along which to compute test. + Default is 0. + If None, compute over the whole array 'a'. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. + The following options are available (default is 'propagate'): + 'propagate' : returns nan + 'raise' : raises an error + 'omit' : performs the calculations ignoring nan values -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/SEM/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/SEM/a1-[autogen]/docstring.txt index b77ffae5b..c80a29ff8 100644 --- a/docs/nodes/SCIPY/STATS/SEM/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/SEM/a1-[autogen]/docstring.txt @@ -1,30 +1,31 @@ - The SEM node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute standard error of the mean. + Compute the standard error of the mean. - Calculate the standard error of the mean (or standard error of measurement) of the values in the input array. + Calculate the standard error of the mean (or standard error of measurement) of the values in the input array. -Parameters ----------- -a : array_like - An array containing the values for which the standard error is returned. -axis : int or None, optional - Axis along which to operate. Default is 0. If None, compute over the whole array 'a'. -ddof : int, optional - Delta degrees-of-freedom. How many degrees of freedom to adjust - for bias in limited samples relative to the population estimate of variance. - Defaults to 1. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. - The following options are available (default is 'propagate'): - 'propagate' : returns nan - 'raise' : throws an error - 'omit' : performs the calculations ignoring nan values + Parameters + ---------- + a : array_like + An array containing the values for which the standard error is returned. + axis : int or None, optional + Axis along which to operate. + Default is 0. + If None, compute over the whole array 'a'. + ddof : int, optional + Delta degrees-of-freedom. How many degrees of freedom to adjust + for bias in limited samples relative to the population estimate of variance. + Defaults to 1. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. + The following options are available (default is 'propagate'): + 'propagate' : returns nan + 'raise' : raises an error + 'omit' : performs the calculations ignoring nan values -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/SHAPIRO/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/SHAPIRO/a1-[autogen]/docstring.txt index d13d35cb1..587f591ed 100644 --- a/docs/nodes/SCIPY/STATS/SHAPIRO/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/SHAPIRO/a1-[autogen]/docstring.txt @@ -1,21 +1,20 @@ - The SHAPIRO node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Perform the Shapiro-Wilk test for normality. + Perform the Shapiro-Wilk test for normality. - The Shapiro-Wilk test tests the null hypothesis that the data was drawn from a normal distribution. + The Shapiro-Wilk test tests the null hypothesis that the data was drawn from a normal distribution. -Parameters ----------- -select_return : This function has returns multiple objects ['statistic', 'p-value']. - Select the desired one to return. - See the respective function docs for descriptors. -x : array_like - Array of sample data. + Parameters + ---------- + select_return : 'statistic', 'p-value' + Select the desired object to return. + See the respective function docs for descriptors. + x : array_like + Array of sample data. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/SKEW/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/SKEW/a1-[autogen]/docstring.txt index 51f99edc8..de67d844d 100644 --- a/docs/nodes/SCIPY/STATS/SKEW/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/SKEW/a1-[autogen]/docstring.txt @@ -1,40 +1,40 @@ - The SKEW node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the sample skewness of a data set. + Compute the sample skewness of a dataset. - For normally distributed data, the skewness should be about zero. - For unimodal continuous distributions, a skewness value greater than zero means that there is more weight in the right tail of the distribution. \ - The function 'skewtest' can be used to determine if the skewness value is close enough to zero, statistically speaking. + For normally distributed data, the skewness should be about zero. + For unimodal continuous distributions, a skewness value greater than zero means that there is more weight in the right tail of the distribution. \ + The function 'skewtest' can be used to determine if the skewness value is close enough to zero, statistically speaking. -Parameters ----------- -a : ndarray - Input array. -axis : int or None, default: 0 - If an int, the axis of the input along which to compute the statistic. - The statistic of each axis-slice (e.g. row) of the input will appear in a - corresponding element of the output. - If None, the input will be raveled before computing the statistic. -bias : bool, optional - If False, then the calculations are corrected for statistical bias. -nan_policy : {'propagate', 'omit', 'raise'} - Defines how to handle input NaNs. - - propagate : if a NaN is present in the axis slice (e.g. row) along - which the statistic is computed, the corresponding entry of the output - will be NaN. - - omit : NaNs will be omitted when performing the calculation. - If insufficient data remains in the axis slice along which the - statistic is computed, the corresponding entry of the output will be NaN. - - raise : if a NaN is present, a ValueError will be raised. -keepdims : bool, default: False - If this is set to True, the axes which are reduced are left - in the result as dimensions with size one. With this option, - the result will broadcast correctly against the input array. + Parameters + ---------- + a : ndarray + Input array. + axis : int + Default = 0. + If an int, the axis of the input along which to compute the statistic. + The statistic of each axis-slice (e.g. row) of the input will appear in a + corresponding element of the output. + If None, the input will be raveled before computing the statistic. + bias : bool, optional + If False, then the calculations are corrected for statistical bias. + nan_policy : {'propagate', 'omit', 'raise'} + Defines how to handle input NaNs. + - propagate : if a NaN is present in the axis slice (e.g. row) along + which the statistic is computed, the corresponding entry of the output + will be NaN. + - omit : NaNs will be omitted when performing the calculation. + If insufficient data remains in the axis slice along which the + statistic is computed, the corresponding entry of the output will be NaN. + - raise : if a NaN is present, a ValueError will be raised. + keepdims : bool, default: False + If this is set to True, the axes which are reduced are left + in the result as dimensions with size one. With this option, + the result will broadcast correctly against the input array. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/SKEWTEST/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/SKEWTEST/a1-[autogen]/docstring.txt index 1697375b2..ecdb19f12 100644 --- a/docs/nodes/SCIPY/STATS/SKEWTEST/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/SKEWTEST/a1-[autogen]/docstring.txt @@ -1,41 +1,42 @@ - The SKEWTEST node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Test whether the skew is different from the normal distribution. + Test whether the skewness is different from the normal distribution. - This function tests the null hypothesis that the skewness of the population that the sample was drawn from is the same as that of a corresponding normal distribution. + This function tests the null hypothesis that the skewness of the population that the sample was drawn from is the same as that of a corresponding normal distribution. -Parameters ----------- -select_return : This function has returns multiple objects ['statistic', 'pvalue']. - Select the desired one to return. - See the respective function docs for descriptors. -a : array - The data to be tested. -axis : int or None, optional - Axis along which statistics are calculated. Default is 0. - If None, compute over the whole array `a`. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. - The following options are available (default is 'propagate'): - 'propagate' : returns nan - 'raise' : throws an error - 'omit' : performs the calculations ignoring nan values -alternative : {'two-sided', 'less', 'greater'}, optional - Defines the alternative hypothesis. Default is 'two-sided'. - The following options are available: - 'two-sided' : the skewness of the distribution underlying the sample - is different from that of the normal distribution (i.e. 0) - 'less' : the skewness of the distribution underlying the sample - is less than that of the normal distribution - 'greater' : the skewness of the distribution underlying the sample - is greater than that of the normal distribution + Parameters + ---------- + select_return : 'statistic', 'pvalue' + Select the desired object to return. + See the respective function docs for descriptors. + a : array + The data to be tested. + axis : int or None, optional + Axis along which statistics are calculated. + Default is 0. + If None, compute over the whole array 'a'. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. + The following options are available (default is 'propagate'): + 'propagate' : returns nan + 'raise' : throws an error + 'omit' : performs the calculations ignoring nan values + alternative : {'two-sided', 'less', 'greater'}, optional + Defines the alternative hypothesis. + Default is 'two-sided'. + The following options are available: + 'two-sided' : the skewness of the distribution underlying the sample + is different from that of the normal distribution (i.e. 0) + 'less' : the skewness of the distribution underlying the sample + is less than that of the normal distribution + 'greater' : the skewness of the distribution underlying the sample + is greater than that of the normal distribution -.. versionadded:: 1.7.0 + .. versionadded:: 1.7.0 -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/TMAX/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/TMAX/a1-[autogen]/docstring.txt index 800705386..059ef6931 100644 --- a/docs/nodes/SCIPY/STATS/TMAX/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/TMAX/a1-[autogen]/docstring.txt @@ -1,32 +1,34 @@ - The TMAX node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the trimmed maximum. + Compute the trimmed maximum. - This function computes the maximum value of an array along a given axis, while ignoring values larger than a specified upper limit. + This function computes the maximum value of an array along a given axis, while ignoring values larger than a specified upper limit. -Parameters ----------- -a : array_like - Array of values. -upperlimit : None or float, optional - Values in the input array greater than the given limit will be ignored. - When upperlimit is None, then all values are used. The default value is None. -axis : int or None, optional - Axis along which to operate. Default is 0. If None, compute over the whole array 'a'. -inclusive : {True, False}, optional - This flag determines whether values exactly equal to the upper limit are included. - The default value is True. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. - The following options are available (default is 'propagate'): - 'propagate' : returns nan - 'raise' : throws an error - 'omit' : performs the calculations ignoring nan values + Parameters + ---------- + a : array_like + Array of values. + upperlimit : None or float, optional + Values in the input array greater than the given limit will be ignored. + When upperlimit is None, then all values are used. + The default value is None. + axis : int or None, optional + Axis along which to operate. + Default is 0. + If None, compute over the whole array 'a'. + inclusive : {True, False}, optional + This flag determines whether values exactly equal to the upper limit are included. + The default value is True. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. + The following options are available (default is 'propagate'): + 'propagate' : returns nan + 'raise' : raises an error + 'omit' : performs the calculations ignoring nan values -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/TMIN/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/TMIN/a1-[autogen]/docstring.txt index aaeda4015..859e0ad9c 100644 --- a/docs/nodes/SCIPY/STATS/TMIN/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/TMIN/a1-[autogen]/docstring.txt @@ -1,32 +1,34 @@ - The TMIN node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the trimmed minimum. + Compute the trimmed minimum. - This function finds the miminum value of an array 'a' along the specified axis, but only considering values greater than a specified lower limit. + This function finds the miminum value of an array 'a' along the specified axis, but only considering values greater than a specified lower limit. -Parameters ----------- -a : array_like - Array of values. -lowerlimit : None or float, optional - Values in the input array less than the given limit will be ignored. - When lowerlimit is None, then all values are used. The default value is None. -axis : int or None, optional - Axis along which to operate. Default is 0. If None, compute over the whole array 'a'. -inclusive : {True, False}, optional - This flag determines whether values exactly equal to the lower limit are included. - The default value is True. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. - The following options are available (default is 'propagate'): - 'propagate' : returns nan - 'raise' : throws an error - 'omit' : performs the calculations ignoring nan values + Parameters + ---------- + a : array_like + Array of values. + lowerlimit : None or float, optional + Values in the input array less than the given limit will be ignored. + When lowerlimit is None, then all values are used. + The default value is None. + axis : int or None, optional + Axis along which to operate. + Default is 0. + If None, compute over the whole array 'a'. + inclusive : {True, False}, optional + This flag determines whether values exactly equal to the lower limit are included. + The default value is True. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. + The following options are available (default is 'propagate'): + 'propagate' : returns nan + 'raise' : raises an error + 'omit' : performs the calculations ignoring nan values -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/TRIM_MEAN/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/TRIM_MEAN/a1-[autogen]/docstring.txt index 29777b050..0fbe59945 100644 --- a/docs/nodes/SCIPY/STATS/TRIM_MEAN/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/TRIM_MEAN/a1-[autogen]/docstring.txt @@ -1,25 +1,25 @@ - The TRIM_MEAN node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Return mean of array after trimming distribution from both tails. + Return the mean of an array after trimming distribution from both tails. - If `proportiontocut` = 0.1, slices off 'leftmost' and 'rightmost' 10% of scores. - The input is sorted before slicing. - Slices off less if proportion results in a non-integer slice index (i.e. conservatively slices off 'proportiontocut'). + If `proportiontocut` = 0.1, slices off 'leftmost' and 'rightmost' 10% of scores. + The input is sorted before slicing. + Slices off less if proportion results in a non-integer slice index (i.e. conservatively slices off 'proportiontocut'). -Parameters ----------- -a : array_like - Input array. -proportiontocut : float - Fraction to cut off of both tails of the distribution. -axis : int or None, optional - Axis along which the trimmed means are computed. Default is 0. - If None, compute over the whole array `a`. + Parameters + ---------- + a : array_like + Input array. + proportiontocut : float + Fraction to cut off of both tails of the distribution. + axis : int, optional + Axis along which the trimmed means are computed. + Default is 0. + If None, compute over the whole array 'a'. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/TTEST_1SAMP/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/TTEST_1SAMP/a1-[autogen]/docstring.txt index 630d5e45d..59d99b12e 100644 --- a/docs/nodes/SCIPY/STATS/TTEST_1SAMP/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/TTEST_1SAMP/a1-[autogen]/docstring.txt @@ -1,43 +1,44 @@ - The TTEST_1SAMP node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Calculate the T-test for the mean of ONE group of scores. + Calculate the T-test for the mean of ONE group of scores. - This is a test for the null hypothesis that the expected value (mean) of a sample of independent observations 'a' is equal to the given population mean, 'popmean'. + This is a test for the null hypothesis that the expected value (mean) of a sample of independent observations 'a' is equal to the given population mean, 'popmean'. -Parameters ----------- -select_return : This function has returns multiple objects ['statistic', 'pvalue']. - Select the desired one to return. - See the respective function docs for descriptors. -a : array_like - Sample observation. -popmean : float or array_like - Expected value in null hypothesis. - If array_like, then it must have the same shape as 'a' excluding the axis dimension. -axis : int or None, optional - Axis along which to compute test; default is 0. If None, compute over the whole array 'a'. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. - The following options are available (default is 'propagate'): - 'propagate' : returns nan - 'raise' : throws an error - 'omit' : performs the calculations ignoring nan values -alternative : {'two-sided', 'less', 'greater'}, optional - Defines the alternative hypothesis. - The following options are available (default is 'two-sided'): - 'two-sided' : the mean of the underlying distribution of the sample - is different than the given population mean (`popmean`) - 'less' : the mean of the underlying distribution of the sample is - less than the given population mean (`popmean`) - 'greater' : the mean of the underlying distribution of the sample is - greater than the given population mean (`popmean`) + Parameters + ---------- + select_return : 'statistic', 'pvalue' + Select the desired object to return. + See the respective function docs for descriptors. + a : array_like + Sample observation. + popmean : float or array_like + Expected value in null hypothesis. + If array_like, then it must have the same shape as 'a' excluding the axis dimension. + axis : int or None, optional + Axis along which to compute test. + Default is 0. + If None, compute over the whole array 'a'. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. + The following options are available (default is 'propagate'): + 'propagate' : returns nan + 'raise' : raises an error + 'omit' : performs the calculations ignoring nan values + alternative : {'two-sided', 'less', 'greater'}, optional + Defines the alternative hypothesis. + The following options are available (default is 'two-sided'): + 'two-sided' : the mean of the underlying distribution of the sample + is different than the given population mean (`popmean`) + 'less' : the mean of the underlying distribution of the sample is + less than the given population mean (`popmean`) + 'greater' : the mean of the underlying distribution of the sample is + greater than the given population mean (`popmean`) -.. versionadded:: 1.6.0 + .. versionadded:: 1.6.0 -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/VARIATION/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/VARIATION/a1-[autogen]/docstring.txt index 62855db65..1b397c58e 100644 --- a/docs/nodes/SCIPY/STATS/VARIATION/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/VARIATION/a1-[autogen]/docstring.txt @@ -1,51 +1,50 @@ - The VARIATION node is based on a numpy or scipy function. -The description of that function is as follows: - - Compute the coefficient of variation. - - The coefficient of variation is the standard deviation divided by the mean. - - This function is equivalent to:: - - np.std(x, axis=axis, ddof=ddof) / np.mean(x) - - The default for "ddof" is 0, but many definitions of the coefficient of variation - use the square root of the unbiased sample variance for the sample standard deviation, which corresponds to "ddof=1". - - The function does not take the absolute value of the mean of the data, so the return value is negative if the mean is negative. - -Parameters ----------- -a : array_like - Input array. -axis : int or None, optional - Axis along which to calculate the coefficient of variation. - Default is 0. If None, compute over the whole array 'a'. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains 'nan'. - The following options are available: - 'propagate' : return 'nan' - 'raise' : raise an exception - 'omit' : perform the calculation with 'nan' values omitted - The default is 'propagate'. -ddof : int, optional - Gives the "Delta Degrees Of Freedom" used when computing the - standard deviation. The divisor used in the calculation of the - standard deviation is 'N - ddof', where 'N' is the number of - elements. 'ddof' must be less than 'N'; if it isn't, the result - will be 'nan' or 'inf', depending on 'N' and the values in - the array. By default `ddof` is zero for backwards compatibility, - but it is recommended to use 'ddof=1' to ensure that the sample - standard deviation is computed as the square root of the unbiased - sample variance. -keepdims : bool, optional - If this is set to True, the axes which are reduced are left in the - result as dimensions with size one. With this option, the result - will broadcast correctly against the input array. - -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + The description of that function is as follows: + + Compute the coefficient of variation. + + The coefficient of variation is the standard deviation divided by the mean. + + This function is equivalent to: + + np.std(x, axis=axis, ddof=ddof) / np.mean(x) + + The default for 'ddof' is 0, but many definitions of the coefficient of variation use the square root of the unbiased sample variance for the sample standard deviation, which corresponds to 'ddof=1'. + + The function does not take the absolute value of the mean of the data, so the return value is negative if the mean is negative. + + Parameters + ---------- + a : array_like + Input array. + axis : int, optional + Axis along which to calculate the coefficient of variation. + Default is 0. + If None, compute over the whole array 'a'. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains 'nan'. + The following options are available: + 'propagate' : return 'nan' + 'raise' : raise an exception + 'omit' : perform the calculation with 'nan' values omitted + The default is 'propagate'. + ddof : int, optional + Gives the "Delta Degrees Of Freedom" used when computing the standard deviation. + The divisor used in the calculation of the standard deviation is 'N - ddof', + where 'N' is the number of elements. + 'ddof' must be less than 'N'; if it isn't, the result will be 'nan' or 'inf', + depending on 'N' and the values in the array. + By default, 'ddof' is zero for backwards compatibility, + but it is recommended to use 'ddof=1' to ensure that the sample + standard deviation is computed as the square root of the unbiased + sample variance. + keepdims : bool, optional + If this is set to True, the axes which are reduced are left in the + result as dimensions with size one. + With this option, the result will broadcast correctly against the input array. + + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/SCIPY/STATS/ZSCORE/a1-[autogen]/docstring.txt b/docs/nodes/SCIPY/STATS/ZSCORE/a1-[autogen]/docstring.txt index 20e8208ad..699f09c6d 100644 --- a/docs/nodes/SCIPY/STATS/ZSCORE/a1-[autogen]/docstring.txt +++ b/docs/nodes/SCIPY/STATS/ZSCORE/a1-[autogen]/docstring.txt @@ -1,29 +1,30 @@ - The ZSCORE node is based on a numpy or scipy function. -The description of that function is as follows: + The description of that function is as follows: - Compute the z score. + Compute the z-score. - Compute the z score of each value in the sample, relative to the sample mean and standard deviation. + Compute the z-score of each value in the sample, relative to the sample mean and standard deviation. -Parameters ----------- -a : array_like - An array like object containing the sample data. -axis : int or None, optional - Axis along which to operate. Default is 0. If None, compute over the whole array 'a'. -ddof : int, optional - Degrees of freedom correction in the calculation of the standard deviation. - Default is 0. -nan_policy : {'propagate', 'raise', 'omit'}, optional - Defines how to handle when input contains nan. 'propagate' returns nan, - 'raise' throws an error, 'omit' performs the calculations ignoring nan - values. Default is 'propagate'. Note that when the value is 'omit', - nans in the input also propagate to the output, but they do not affect - the z-scores computed for the non-nan values. + Parameters + ---------- + a : array_like + An array like object containing the sample data. + axis : int, optional + Axis along which to operate. + Default is 0. + If None, compute over the whole array 'a'. + ddof : int, optional + Degrees of freedom correction in the calculation of the standard deviation. + Default is 0. + nan_policy : {'propagate', 'raise', 'omit'}, optional + Defines how to handle when input contains nan. 'propagate' returns nan, + 'raise' throws an error, 'omit' performs the calculations ignoring nan values. + Default is 'propagate'. + Note that when the value is 'omit', nans in the input also propagate to the output, + but they do not affect the z-scores computed for the non-nan values. -Returns -------- -DataContainer - type 'ordered pair', 'scalar', or 'matrix' + Returns + ------- + DataContainer + type 'ordered pair', 'scalar', or 'matrix' diff --git a/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_DEFINITE_INTEGRAL/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_DEFINITE_INTEGRAL/a1-[autogen]/docstring.txt index 7d2172b7e..73c84bc81 100644 --- a/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_DEFINITE_INTEGRAL/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_DEFINITE_INTEGRAL/a1-[autogen]/docstring.txt @@ -1,9 +1,11 @@ -The DOUBLE_DEFINITE_INTEGRAL node takes a function, upper, and lower bounds as input. It then computes double integral of the given function. +The DOUBLE_DEFINITE_INTEGRAL node takes a function, upper, and lower bounds as input. - Proper Syntax for function input example: + It then computes a double integral of the given function. + + Example of proper syntax for the function input: 2*x*y - Improper Syntax for function input example: + Example of improper syntax for the function input: 2xy Parameters diff --git a/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_INDEFINITE_INTEGRAL/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_INDEFINITE_INTEGRAL/a1-[autogen]/docstring.txt index 07f1a723b..edba4c7ac 100644 --- a/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_INDEFINITE_INTEGRAL/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/CALCULUS/DOUBLE_INDEFINITE_INTEGRAL/a1-[autogen]/docstring.txt @@ -1,8 +1,9 @@ -The DOUBLE_INDEFINITE_INTEGRAL node takes an OrderedTriple (x,y,z) and have the width and height parameters. +The DOUBLE_INDEFINITE_INTEGRAL node takes an OrderedTriple (x,y,z) and has width and height parameters. - The width and height represent the number of columns and rows, respectively, that the x, y, and z reshape matrices will have. Here it is important to note that the length of x, y, and z is the same and that the width times the height needs to be equal to the length of x, y, and z. + The width and height represent the number of columns and rows, respectively, that the x, y, and z reshaped matrices will have. + Here it is important to note that the length of x, y, and z is the same, and that the width times the height needs to be equal to the length of x, y, and z. - It computes the double integral approximation according to given dimensions of the matrices, and it returns a matrix where each cell represents the volume up to the given point. + It computes the double integral approximation according to given dimensions of the matrices, and returns a matrix where each cell represents the volume up to the given point. Inputs ------ diff --git a/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/REGION_PROPERTIES/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/REGION_PROPERTIES/a1-[autogen]/docstring.txt index 983276d19..945be4ade 100644 --- a/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/REGION_PROPERTIES/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/IMAGE_PROCESSING/REGION_PROPERTIES/a1-[autogen]/docstring.txt @@ -1,5 +1,6 @@ -The image processing REGION_PROPERTIES node is a stand-alone visualizer for analyzing - an input array of data. There are multiple input 'DataContainer' types for which +The image processing REGION_PROPERTIES node is a stand-alone visualizer for analyzing an input array of data. + + There are multiple input 'DataContainer' types for which this function is applicable: 'Image', 'Grayscale', or 'Matrix'. Often in image analysis, it is necessary to determine subvolumes / subregions @@ -10,7 +11,7 @@ The image processing REGION_PROPERTIES node is a stand-alone visualizer for anal is entirely provided by this node in a two-step process: - First, the regions of the INTEGER image are identified and labelled. - - Second, the regions are analysed. + - Second, the regions are analyzed. The first step is provided by the morphology library of scikit-image's label function, while the second is provided by scikit-image's regionprops function. @@ -31,5 +32,5 @@ The image processing REGION_PROPERTIES node is a stand-alone visualizer for anal Returns ------- - fig : Plotly + fig: Plotly A Plotly figure containing the illustrated features as determined by this node. diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/DOT_PRODUCT/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/DOT_PRODUCT/a1-[autogen]/docstring.txt index 7fceea010..396982511 100644 --- a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/DOT_PRODUCT/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/DOT_PRODUCT/a1-[autogen]/docstring.txt @@ -1,7 +1,6 @@ -The DOT_PRODUCT node takes two input matrices, multiplies them - (by dot product), and returns the result. +The DOT_PRODUCT node takes two input matrices, multiplies them (by dot product), and returns the result. - When multiplying a scalar use the MULTIPLY node. + To multiply a scalar, use the MULTIPLY node. Inputs ------ diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/SHUFFLE_MATRIX.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/SHUFFLE_MATRIX.md new file mode 100644 index 000000000..1c7b5f9a6 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/SHUFFLE_MATRIX.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..ac37e6ac6 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/a1-[autogen]/docstring.txt @@ -0,0 +1,16 @@ +The SHUFFLE_MATRIX node returns a matrix that is randomly shuffled by the first axis + + Inputs + ------ + default : Matrix + The input Matrix + + Parameters + ---------- + axis : int + Axis along the matrix is shuffled. If axis is 0, shuffled by row and if it is 1, shuffled by column. + + Returns + ------- + Matrix + Shuffled input Matrix diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..c1228c713 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/a1-[autogen]/python_code.txt @@ -0,0 +1,21 @@ +from numpy.random import permutation +from flojoy import flojoy, Matrix + + +@flojoy +def SHUFFLE_MATRIX( + default: Matrix, + axis: int = 0, +) -> Matrix: + + + if axis == 1: + indices_1 = permutation(default.m.shape[0]) + shuffledMatrix = default.m[indices_1, :] + elif axis == 0: + indices_2 = permutation(default.m.shape[1]) + shuffledMatrix = default.m[:, indices_2] + else: + raise AssertionError(f"Axis must be either 0 or 1, but provided {axis}") + + return Matrix(m=shuffledMatrix) diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/hardware.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/media.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/notes.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/examples/EX1/app.json new file mode 100644 index 000000000..83603098b --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/examples/EX1/app.json @@ -0,0 +1,226 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 225, + "height": 226, + "id": "MATRIX_VIEW-ca7c0511-5bf5-4fb3-85f8-9abf61f9bd6d", + "type": "VISUALIZERS", + "data": { + "id": "MATRIX_VIEW-ca7c0511-5bf5-4fb3-85f8-9abf61f9bd6d", + "label": "MATRIX VIEW", + "func": "MATRIX_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|Matrix", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing visualization of the input in matrix format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/MATRIX_VIEW.py", + "selected": false + }, + "position": { + "x": 379.1226866599348, + "y": 34.39643650666545 + }, + "selected": false, + "positionAbsolute": { + "x": 379.1226866599348, + "y": 34.39643650666545 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "MATRIX_VIEW-63eb6c70-1a2c-4434-889a-c4f97404ea40", + "type": "VISUALIZERS", + "data": { + "id": "MATRIX_VIEW-63eb6c70-1a2c-4434-889a-c4f97404ea40", + "label": "MATRIX VIEW 1", + "func": "MATRIX_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|Matrix", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing visualization of the input in matrix format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/MATRIX_VIEW.py", + "selected": false + }, + "position": { + "x": -6.079689279371038, + "y": -246.39609132482946 + }, + "selected": false, + "positionAbsolute": { + "x": -6.079689279371038, + "y": -246.39609132482946 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "MATRIX-8fef8f0a-a169-43da-811e-7de42efcbc74", + "type": "GENERATORS", + "data": { + "id": "MATRIX-8fef8f0a-a169-43da-811e-7de42efcbc74", + "label": "MATRIX", + "func": "MATRIX", + "type": "GENERATORS", + "ctrls": { + "row": { + "type": "int", + "default": 2, + "desc": "number of rows", + "overload": null, + "functionName": "MATRIX", + "param": "row", + "value": 5 + }, + "column": { + "type": "int", + "default": 2, + "desc": "number of columns", + "overload": null, + "functionName": "MATRIX", + "param": "column", + "value": 5 + } + }, + "initCtrls": {}, + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Matrix", + "desc": "randomly generated matrix" + } + ], + "path": "GENERATORS/SIMULATIONS/MATRIX/MATRIX.py", + "selected": false + }, + "position": { + "x": -356.0239295146764, + "y": 1.3087014705177182 + }, + "selected": false, + "positionAbsolute": { + "x": -356.0239295146764, + "y": 1.3087014705177182 + }, + "dragging": true + }, + { + "width": 160, + "height": 160, + "id": "SHUFFLE_MATRIX-1d233e3b-94d1-42ed-9428-797664b893d3", + "type": "TRANSFORMERS", + "data": { + "id": "SHUFFLE_MATRIX-1d233e3b-94d1-42ed-9428-797664b893d3", + "label": "SHUFFLE MATRIX", + "func": "SHUFFLE_MATRIX", + "type": "TRANSFORMERS", + "ctrls": { + "axis": { + "type": "int", + "default": 0, + "desc": "Axis along the matrix is shuffled. If axis is 0, shuffled by row and if it is 1, shuffled by column.", + "overload": null, + "functionName": "SHUFFLE_MATRIX", + "param": "axis", + "value": 0 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Matrix", + "multiple": false, + "desc": "The input Matrix" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Matrix", + "desc": "Shuffled input Matrix" + } + ], + "path": "TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/SHUFFLE_MATRIX.py", + "selected": true + }, + "position": { + "x": 31.649137299539106, + "y": 91.15920804291972 + }, + "selected": true, + "positionAbsolute": { + "x": 31.649137299539106, + "y": 91.15920804291972 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "MATRIX-8fef8f0a-a169-43da-811e-7de42efcbc74", + "sourceHandle": "default", + "target": "MATRIX_VIEW-63eb6c70-1a2c-4434-889a-c4f97404ea40", + "targetHandle": "default", + "id": "reactflow__edge-MATRIX-8fef8f0a-a169-43da-811e-7de42efcbc74default-MATRIX_VIEW-63eb6c70-1a2c-4434-889a-c4f97404ea40default" + }, + { + "source": "SHUFFLE_MATRIX-1d233e3b-94d1-42ed-9428-797664b893d3", + "sourceHandle": "default", + "target": "MATRIX_VIEW-ca7c0511-5bf5-4fb3-85f8-9abf61f9bd6d", + "targetHandle": "default", + "id": "reactflow__edge-SHUFFLE_MATRIX-1d233e3b-94d1-42ed-9428-797664b893d3default-MATRIX_VIEW-ca7c0511-5bf5-4fb3-85f8-9abf61f9bd6ddefault" + }, + { + "source": "MATRIX-8fef8f0a-a169-43da-811e-7de42efcbc74", + "sourceHandle": "default", + "target": "SHUFFLE_MATRIX-1d233e3b-94d1-42ed-9428-797664b893d3", + "targetHandle": "default", + "id": "reactflow__edge-MATRIX-8fef8f0a-a169-43da-811e-7de42efcbc74default-SHUFFLE_MATRIX-1d233e3b-94d1-42ed-9428-797664b893d3default" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/examples/EX1/example.md new file mode 100644 index 000000000..a7275b467 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/examples/EX1/example.md @@ -0,0 +1,4 @@ +In this example, we generate a matrix type data using `MATRIX` node. + +Using `SHUFFLE_MATRIX`, we randomly shuffle it by the first axis and visualize it using `MATRIX_VIEW` node. + diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/SORT_MATRIX.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/SORT_MATRIX.md new file mode 100644 index 000000000..9f076930b --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/SORT_MATRIX.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..5fab672b1 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/a1-[autogen]/docstring.txt @@ -0,0 +1,16 @@ +The SORT_MATRIX node takes a input matrix and sort it along the chosen axis. + + Inputs + ------ + a : Matrix + The input matrix to be multiplied to input b + + Parameters + ---------- + axis : int + Axis along which to sort. Default is -1, which means sort along the last axis. + + Returns + ------- + Matrix + The matrix result from sorting. diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..14ddea863 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/a1-[autogen]/python_code.txt @@ -0,0 +1,11 @@ +from numpy import sort +from flojoy import flojoy, Matrix + + +@flojoy +def SORT_MATRIX(a: Matrix, axis: int = -1) -> Matrix: + + inputMatrix = a.m + sortedMatrix = sort(inputMatrix, axis=axis) + + return Matrix(m=sortedMatrix) diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/hardware.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/media.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/notes.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/examples/EX1/app.json new file mode 100644 index 000000000..129c76c52 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/examples/EX1/app.json @@ -0,0 +1,226 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 208, + "height": 96, + "id": "MATRIX-453e5a43-4c36-4c10-96d1-36eb01652bbc", + "type": "GENERATORS", + "data": { + "id": "MATRIX-453e5a43-4c36-4c10-96d1-36eb01652bbc", + "label": "MATRIX", + "func": "MATRIX", + "type": "GENERATORS", + "ctrls": { + "row": { + "type": "int", + "default": 2, + "desc": "number of rows", + "overload": null, + "functionName": "MATRIX", + "param": "row", + "value": 2 + }, + "column": { + "type": "int", + "default": 2, + "desc": "number of columns", + "overload": null, + "functionName": "MATRIX", + "param": "column", + "value": 2 + } + }, + "initCtrls": {}, + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Matrix", + "desc": "randomly generated matrix" + } + ], + "path": "GENERATORS/SIMULATIONS/MATRIX/MATRIX.py", + "selected": false + }, + "position": { + "x": -334.78473381062497, + "y": 61.721859262380775 + }, + "selected": false, + "positionAbsolute": { + "x": -334.78473381062497, + "y": 61.721859262380775 + }, + "dragging": true + }, + { + "width": 240, + "height": 260, + "id": "MATRIX_VIEW-d554259d-56a7-40c2-8b39-d51c41eac2f3", + "type": "VISUALIZERS", + "data": { + "id": "MATRIX_VIEW-d554259d-56a7-40c2-8b39-d51c41eac2f3", + "label": "MATRIX VIEW", + "func": "MATRIX_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|Matrix", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing visualization of the input in matrix format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/MATRIX_VIEW.py", + "selected": false + }, + "position": { + "x": 292.07050554896784, + "y": 58.394514329837705 + }, + "selected": false, + "positionAbsolute": { + "x": 292.07050554896784, + "y": 58.394514329837705 + }, + "dragging": true + }, + { + "width": 240, + "height": 260, + "id": "MATRIX_VIEW-140d7df7-5b7c-4755-85f6-3e256f3ba3ed", + "type": "VISUALIZERS", + "data": { + "id": "MATRIX_VIEW-140d7df7-5b7c-4755-85f6-3e256f3ba3ed", + "label": "MATRIX VIEW 1", + "func": "MATRIX_VIEW", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|Matrix", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing visualization of the input in matrix format" + } + ], + "path": "VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/MATRIX_VIEW.py", + "selected": false + }, + "position": { + "x": -8.565506242723643, + "y": -187.120327026692 + }, + "selected": false, + "positionAbsolute": { + "x": -8.565506242723643, + "y": -187.120327026692 + }, + "dragging": true + }, + { + "width": 160, + "height": 160, + "id": "SORT_MATRIX-602b2607-62f8-44e9-803f-f34f0b3bdf30", + "type": "TRANSFORMERS", + "data": { + "id": "SORT_MATRIX-602b2607-62f8-44e9-803f-f34f0b3bdf30", + "label": "SORT MATRIX", + "func": "SORT_MATRIX", + "type": "TRANSFORMERS", + "ctrls": { + "axis": { + "type": "int", + "default": -1, + "desc": "Axis along which to sort. Default is -1, which means sort along the last axis.", + "overload": null, + "functionName": "SORT_MATRIX", + "param": "axis", + "value": 1 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "a", + "id": "a", + "type": "Matrix", + "multiple": false, + "desc": "The input matrix to be multiplied to input b" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Matrix", + "desc": "The matrix result from the matrix multiplication." + } + ], + "path": "TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/SORT_MATRIX.py", + "selected": true + }, + "position": { + "x": 12.888961255170187, + "y": 92.47346393609047 + }, + "selected": true, + "positionAbsolute": { + "x": 12.888961255170187, + "y": 92.47346393609047 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "MATRIX-453e5a43-4c36-4c10-96d1-36eb01652bbc", + "sourceHandle": "default", + "target": "MATRIX_VIEW-140d7df7-5b7c-4755-85f6-3e256f3ba3ed", + "targetHandle": "default", + "id": "reactflow__edge-MATRIX-453e5a43-4c36-4c10-96d1-36eb01652bbcdefault-MATRIX_VIEW-140d7df7-5b7c-4755-85f6-3e256f3ba3eddefault" + }, + { + "source": "MATRIX-453e5a43-4c36-4c10-96d1-36eb01652bbc", + "sourceHandle": "default", + "target": "SORT_MATRIX-602b2607-62f8-44e9-803f-f34f0b3bdf30", + "targetHandle": "a", + "id": "reactflow__edge-MATRIX-453e5a43-4c36-4c10-96d1-36eb01652bbcdefault-SORT_MATRIX-602b2607-62f8-44e9-803f-f34f0b3bdf30a" + }, + { + "source": "SORT_MATRIX-602b2607-62f8-44e9-803f-f34f0b3bdf30", + "sourceHandle": "default", + "target": "MATRIX_VIEW-d554259d-56a7-40c2-8b39-d51c41eac2f3", + "targetHandle": "default", + "id": "reactflow__edge-SORT_MATRIX-602b2607-62f8-44e9-803f-f34f0b3bdf30default-MATRIX_VIEW-d554259d-56a7-40c2-8b39-d51c41eac2f3default" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/examples/EX1/example.md new file mode 100644 index 000000000..b17f68e89 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we generate a Matrix type data using `MATRIX` node. + +Using `SORT_MATRIX`, sort the matrix by the input axis. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/ORDERED_PAIR_MANIPULATION/ORDERED_PAIR_XY_INVERT/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/ORDERED_PAIR_MANIPULATION/ORDERED_PAIR_XY_INVERT/a1-[autogen]/docstring.txt index 833af5506..612c65b34 100644 --- a/docs/nodes/TRANSFORMERS/ORDERED_PAIR_MANIPULATION/ORDERED_PAIR_XY_INVERT/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/ORDERED_PAIR_MANIPULATION/ORDERED_PAIR_XY_INVERT/a1-[autogen]/docstring.txt @@ -1,12 +1,11 @@ -The ORDERED_PAIR_XY_INVERT node returns the OrderedPair - where the axes are inverted +The ORDERED_PAIR_XY_INVERT node returns the OrderedPair where the axes are inverted. Inputs ------ default : OrderedPair - The input OrderedPair that we would like to invert the axes + The input OrderedPair that we would like to invert the axes. Returns ------- OrderedPair - The OrderedPair that is inverted + The OrderedPair that is inverted. diff --git a/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/IFFT/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/IFFT/a1-[autogen]/docstring.txt index 1faa3ecd6..d48e82f31 100644 --- a/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/IFFT/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/IFFT/a1-[autogen]/docstring.txt @@ -1,20 +1,19 @@ - The IFFT node performs the Inverse Discrete Fourier Transform on the input signal. -With the IFFT algorith, the input signal will be transformed from the frequency domain back into the time domain. + With the IFFT algorithm, the input signal will be transformed from the frequency domain back into the time domain. -Inputs ------- -default : OrderedPair - The data to apply inverse FFT to. + Inputs + ------ + default : OrderedPair + The data to apply inverse FFT to. -Parameters ----------- -real_signal : boolean - whether the input signal is real (true) or complex (false) + Parameters + ---------- + real_signal : boolean + whether the input signal is real (true) or complex (false) -Returns -------- -OrderedPair - x = time - y = reconstructed signal + Returns + ------- + OrderedPair + x = time + y = reconstructed signal diff --git a/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/PID/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/PID/a1-[autogen]/docstring.txt index 16d29c1c8..21a95cc7e 100644 --- a/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/PID/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/PID/a1-[autogen]/docstring.txt @@ -1,10 +1,10 @@ The PID node acts like a PID function. - The returned value with be modified according to the - PID parameters Kp, Ki, and Kd. + + The returned value will be modified according to the PID parameters Kp, Ki, and Kd. Inputs ------ - default : Scalar + single_input : Scalar The data to apply the PID function to. Parameters diff --git a/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/TWO_DIMENSIONAL_FFT/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/TWO_DIMENSIONAL_FFT/a1-[autogen]/docstring.txt index 8f08af22c..c21e1b098 100644 --- a/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/TWO_DIMENSIONAL_FFT/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/SIGNAL_PROCESSING/TWO_DIMENSIONAL_FFT/a1-[autogen]/docstring.txt @@ -1,27 +1,26 @@ +The TWO_DIMENSIONAL_FFT node performs a two-dimensional fast fourier transform function on the input matrix. -The TWO_DIMENSIONAL_FFT node performs a two-dimensional fourier transform function on the input matrix. + With the FFT algorithm, the input matrix will undergo a change of basis from the space domain into the frequency domain. -With the FFT algorithm, the input matrix will undergo a change of basis from the space domain into the frequency domain. + grayscale, dataframe, image, or matrix -grayscale, dataframe, image, or matrix + Inputs + ------ + default : Grayscale|DataFrame|Image|Matrix + The 2D data to apply 2DFFT to. -Inputs ------- -default : Grayscale|DataFrame|Image|Matrix - The 2D data to apply 2DFFT to. + Parameters + ---------- + real_signal : bool + true if the input matrix consists of only real numbers, false otherwise + color : select + if the input is an RGBA or RGB image, this parameter selects the color channel to perform the FFT on -Parameters ----------- -real_input : boolean - true if the input matrix consists of only real numbers, false otherwise -color : select - if the input is an RGBA or RGB image, this parameter selects the color channel to perform the FFT on - -Returns -------- -Matrix if input is Matrix - m: the matrix after 2DFFT -DataFrame if input is Dataframe - m: the dataframe after 2DFFT -Image - the frequency spectrum of the color channel + Returns + ------- + Matrix if input is Matrix + m: the matrix after 2DFFT + DataFrame if input is Dataframe + m: the dataframe after 2DFFT + Image + the frequency spectrum of the color channel diff --git a/docs/nodes/TRANSFORMERS/TYPE_CASTING/NP_2_DF/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/TYPE_CASTING/NP_2_DF/a1-[autogen]/docstring.txt index 18f17e95f..6106328d5 100644 --- a/docs/nodes/TRANSFORMERS/TYPE_CASTING/NP_2_DF/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/TYPE_CASTING/NP_2_DF/a1-[autogen]/docstring.txt @@ -3,7 +3,7 @@ The NP_2_DF node converts numpy array data into dataframe type data. Inputs ------ default : DataContainer - The input numpy array to which we apply the conversion to. + The input numpy array which we apply the conversion to. Returns ------- diff --git a/docs/nodes/TRANSFORMERS/TYPE_CASTING/VECTOR_2_ORDERED_PAIR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/TYPE_CASTING/VECTOR_2_ORDERED_PAIR/a1-[autogen]/docstring.txt index 8cde12fbe..3fafc3930 100644 --- a/docs/nodes/TRANSFORMERS/TYPE_CASTING/VECTOR_2_ORDERED_PAIR/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/TYPE_CASTING/VECTOR_2_ORDERED_PAIR/a1-[autogen]/docstring.txt @@ -1,5 +1,4 @@ -The VECTOR_2_ORDERED_PAIR node returns the OrderedPair - where x and y axes are the input nodes +The VECTOR_2_ORDERED_PAIR node returns the OrderedPair where x and y axes are the input nodes. Inputs ------ diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/DECIMATE_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/DECIMATE_VECTOR.md new file mode 100644 index 000000000..b42dd0606 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/DECIMATE_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..0c2e1c2da --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,18 @@ +The DECIMATE_VECTOR node returns the input vector by reducing the + number of points by given factor + + Inputs + ------ + default : Vector + The input vector + + Parameters + ---------- + factor : int + Decimate factor which determines how many elements will be skipped + between each selected element in the output vector + + Returns + ------- + Vector + Decimated vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..7b26a119a --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,11 @@ +from flojoy import flojoy, Vector + + +@flojoy +def DECIMATE_VECTOR( + default: Vector, + factor: int = 1, +) -> Vector: + + + return Vector(v=default.v[::factor]) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/examples/EX1/app.json new file mode 100644 index 000000000..78c72c0f3 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/examples/EX1/app.json @@ -0,0 +1,244 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 168, + "height": 160, + "id": "DECIMATE_VECTOR-f69b3107-67d6-45fe-b8e1-c13a695ef147", + "type": "TRANSFORMERS", + "data": { + "id": "DECIMATE_VECTOR-f69b3107-67d6-45fe-b8e1-c13a695ef147", + "label": "DECIMATE VECTOR", + "func": "DECIMATE_VECTOR", + "type": "TRANSFORMERS", + "ctrls": { + "factor": { + "type": "int", + "default": 1, + "desc": "Decimate factor which determines how many elements will be skipped \nbetween each selected element in the output vector", + "overload": null, + "functionName": "DECIMATE_VECTOR", + "param": "factor", + "value": 3 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "multiple": false, + "desc": "The input vector" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "Decimated vector" + } + ], + "path": "TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/DECIMATE_VECTOR.py", + "selected": false + }, + "position": { + "x": 93.73637261733845, + "y": 288.7013553414237 + }, + "selected": false, + "positionAbsolute": { + "x": 93.73637261733845, + "y": 288.7013553414237 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-4127abc5-0c6b-4ed1-a93d-dafa04ce055b", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-4127abc5-0c6b-4ed1-a93d-dafa04ce055b", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -304.1937350604504, + "y": 175.1811540461215 + }, + "selected": false, + "positionAbsolute": { + "x": -304.1937350604504, + "y": 175.1811540461215 + }, + "dragging": true + }, + { + "width": 380, + "height": 293, + "id": "SCATTER-4d78bb08-9bbe-46fe-96e9-c6df9a4de961", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-4d78bb08-9bbe-46fe-96e9-c6df9a4de961", + "label": "SCATTER", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 427.83363614611415, + "y": 252.7186566241678 + }, + "selected": false, + "positionAbsolute": { + "x": 427.83363614611415, + "y": 252.7186566241678 + }, + "dragging": true + }, + { + "width": 380, + "height": 293, + "id": "SCATTER-d4c3e47e-e9e8-48e1-a14b-20f1557a70b2", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-d4c3e47e-e9e8-48e1-a14b-20f1557a70b2", + "label": "SCATTER 1", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 80.8584343742404, + "y": -33.209565054005054 + }, + "selected": false, + "positionAbsolute": { + "x": 80.8584343742404, + "y": -33.209565054005054 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-4127abc5-0c6b-4ed1-a93d-dafa04ce055b", + "sourceHandle": "default", + "target": "DECIMATE_VECTOR-f69b3107-67d6-45fe-b8e1-c13a695ef147", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-4127abc5-0c6b-4ed1-a93d-dafa04ce055bdefault-DECIMATE_VECTOR-f69b3107-67d6-45fe-b8e1-c13a695ef147default" + }, + { + "source": "DECIMATE_VECTOR-f69b3107-67d6-45fe-b8e1-c13a695ef147", + "sourceHandle": "default", + "target": "SCATTER-4d78bb08-9bbe-46fe-96e9-c6df9a4de961", + "targetHandle": "default", + "id": "reactflow__edge-DECIMATE_VECTOR-f69b3107-67d6-45fe-b8e1-c13a695ef147default-SCATTER-4d78bb08-9bbe-46fe-96e9-c6df9a4de961default" + }, + { + "source": "LINSPACE-4127abc5-0c6b-4ed1-a93d-dafa04ce055b", + "sourceHandle": "default", + "target": "SCATTER-d4c3e47e-e9e8-48e1-a14b-20f1557a70b2", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-4127abc5-0c6b-4ed1-a93d-dafa04ce055bdefault-SCATTER-d4c3e47e-e9e8-48e1-a14b-20f1557a70b2default" + } + ], + "viewport": { + "x": 669.537650867023, + "y": 361.6114317341454, + "zoom": 0.7467072297113905 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/examples/EX1/example.md new file mode 100644 index 000000000..578596b45 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/DECIMATE_VECTOR/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we generate a vector type data using `LINSPACE` node. + +Using `DECIMATE_VECTOR` node, we generate a new decimated vector and plot it in `SCATTER` node. diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/INTERLEAVE_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/INTERLEAVE_VECTOR.md new file mode 100644 index 000000000..3d67bfb74 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/INTERLEAVE_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..a5ea34f9b --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,12 @@ +The INTERLEAVE_VECTOR node combine multiple vectors + into a single vector type by interleaving their elements + + Inputs + ------ + default : Vector + The input vector + + Returns + ------- + Vector + Decimated vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..f6f1afce4 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,19 @@ +from numpy import stack +from flojoy import flojoy, Vector + + +@flojoy +def INTERLEAVE_VECTOR( + default: Vector, + a: list[Vector], +) -> Vector: + + interleavedVectors = [default.v] + + for i in range(len(a)): + interleavedVectors = interleavedVectors + [a[i].v] + + interleavedVector = stack(interleavedVectors) + interleavedVector = interleavedVector.T.flatten() + + return Vector(v=interleavedVector) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/examples/EX1/app.json new file mode 100644 index 000000000..7a94bf666 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/examples/EX1/app.json @@ -0,0 +1,425 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 208, + "height": 96, + "id": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "PYTHON/nodes/GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -378.12059426997826, + "y": -158.2658250562562 + }, + "selected": false, + "positionAbsolute": { + "x": -378.12059426997826, + "y": -158.2658250562562 + }, + "dragging": true + }, + { + "width": 210, + "height": 160, + "id": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "type": "TRANSFORMERS", + "data": { + "id": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "label": "INTERLEAVE VECTOR", + "func": "INTERLEAVE_VECTOR", + "type": "TRANSFORMERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "multiple": false, + "desc": "The input vector" + }, + { + "name": "a", + "id": "a", + "type": "Vector", + "multiple": true, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "Decimated vector" + } + ], + "path": "TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/INTERLEAVE_VECTOR.py", + "selected": false + }, + "position": { + "x": 33.16008993697898, + "y": -6.25441647369496 + }, + "selected": false, + "positionAbsolute": { + "x": 33.16008993697898, + "y": -6.25441647369496 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-e75cec38-4365-4a10-8a6b-5c9315be7f88", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-e75cec38-4365-4a10-8a6b-5c9315be7f88", + "label": "LINSPACE 1", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 20 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -382.3636386831535, + "y": 15.778519867538364 + }, + "selected": false, + "positionAbsolute": { + "x": -382.3636386831535, + "y": 15.778519867538364 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-17d0c4f0-f909-4ec5-96bc-52ace543bdad", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-17d0c4f0-f909-4ec5-96bc-52ace543bdad", + "label": "LINSPACE 2", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 30 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -383.8294538746215, + "y": 143.08726323482057 + }, + "selected": false, + "positionAbsolute": { + "x": -383.8294538746215, + "y": 143.08726323482057 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-22614af2-0a6e-4166-9b32-90f097f212a1", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-22614af2-0a6e-4166-9b32-90f097f212a1", + "label": "LINSPACE 3", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 40 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -387.4441014507578, + "y": 266.64401455543236 + }, + "selected": false, + "positionAbsolute": { + "x": -387.4441014507578, + "y": 266.64401455543236 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "SCATTER-41b72c98-a878-4e0d-a6bb-067c029f9187", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-41b72c98-a878-4e0d-a6bb-067c029f9187", + "label": "SCATTER", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 397.04329776993177, + "y": -45.467492805927236 + }, + "selected": false, + "positionAbsolute": { + "x": 397.04329776993177, + "y": -45.467492805927236 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-e75cec38-4365-4a10-8a6b-5c9315be7f88", + "sourceHandle": "default", + "target": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "targetHandle": "a", + "id": "reactflow__edge-LINSPACE-e75cec38-4365-4a10-8a6b-5c9315be7f88default-INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75aa" + }, + { + "source": "LINSPACE-17d0c4f0-f909-4ec5-96bc-52ace543bdad", + "sourceHandle": "default", + "target": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "targetHandle": "a", + "id": "reactflow__edge-LINSPACE-17d0c4f0-f909-4ec5-96bc-52ace543bdaddefault-INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75aa" + }, + { + "source": "LINSPACE-22614af2-0a6e-4166-9b32-90f097f212a1", + "sourceHandle": "default", + "target": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "targetHandle": "a", + "id": "reactflow__edge-LINSPACE-22614af2-0a6e-4166-9b32-90f097f212a1default-INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75aa" + }, + { + "source": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "sourceHandle": "default", + "target": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0default-INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75adefault" + }, + { + "source": "INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75a", + "sourceHandle": "default", + "target": "SCATTER-41b72c98-a878-4e0d-a6bb-067c029f9187", + "targetHandle": "default", + "id": "reactflow__edge-INTERLEAVE_VECTOR-3a53e603-024e-40e8-b5b9-7edb8792d75adefault-SCATTER-41b72c98-a878-4e0d-a6bb-067c029f9187default" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/examples/EX1/example.md new file mode 100644 index 000000000..96bf5c86a --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/INTERLEAVE_VECTOR/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we generate four different vector type data with the same size using `LINSPACE` node. + +Using `INTERLEAVE_VECTOR` node, we merge these data into a single vector and visualize it using `SCATTER` node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/REMOVE_DUPLICATES_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/REMOVE_DUPLICATES_VECTOR.md new file mode 100644 index 000000000..a7a47652b --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/REMOVE_DUPLICATES_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..6c58eafa3 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,11 @@ +The REMOVE_DUPLICATES_VECTOR node returns a vector with only unique elements + + Inputs + ------ + default : Vector + The input vector + + Returns + ------- + Vector + Unique input vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..e92097da4 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,11 @@ +from numpy import unique +from flojoy import flojoy, Vector + + +@flojoy +def REMOVE_DUPLICATES_VECTOR( + default: Vector, +) -> Vector: + + + return Vector(v=unique(default.v)) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REMOVE_DUPLICATES_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/REVERSE_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/REVERSE_VECTOR.md new file mode 100644 index 000000000..d1987a606 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/REVERSE_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..ff3fdcca1 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,12 @@ +The REVERSE_VECTOR node returns the input vector where + the elements are in the reverse order + + Inputs + ------ + default : Vector + The input vector + + Returns + ------- + Vector + Reversed input vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..8a65d9bdf --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,11 @@ +from numpy import flip +from flojoy import flojoy, Vector + + +@flojoy +def REVERSE_VECTOR( + default: Vector, +) -> Vector: + + + return Vector(v=flip(default.v)) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/examples/EX1/app.json new file mode 100644 index 000000000..3b652cde0 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/examples/EX1/app.json @@ -0,0 +1,234 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 208, + "height": 96, + "id": "LINSPACE-6f1e7e4a-06d1-4022-b1c3-213e27591fc0", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-6f1e7e4a-06d1-4022-b1c3-213e27591fc0", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 1000 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": true + }, + "position": { + "x": -308.5544867125113, + "y": -191.8832935983337 + }, + "selected": true, + "positionAbsolute": { + "x": -308.5544867125113, + "y": -191.8832935983337 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "LINE-aba31de1-3e7a-4d93-ae7c-58abc570a66d", + "type": "VISUALIZERS", + "data": { + "id": "LINE-aba31de1-3e7a-4d93-ae7c-58abc570a66d", + "label": "LINE", + "func": "LINE", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Line visualization of the input data" + } + ], + "path": "VISUALIZERS/PLOTLY/LINE/LINE.py", + "selected": false + }, + "position": { + "x": 407.2235125479349, + "y": -122.52472165388653 + }, + "selected": false, + "positionAbsolute": { + "x": 407.2235125479349, + "y": -122.52472165388653 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "LINE-8723415f-a2db-4e46-b21b-9b1b72206821", + "type": "VISUALIZERS", + "data": { + "id": "LINE-8723415f-a2db-4e46-b21b-9b1b72206821", + "label": "LINE 1", + "func": "LINE", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Line visualization of the input data" + } + ], + "path": "VISUALIZERS/PLOTLY/LINE/LINE.py", + "selected": false + }, + "position": { + "x": 66.85666244496021, + "y": -417.3599452198301 + }, + "selected": false, + "positionAbsolute": { + "x": 66.85666244496021, + "y": -417.3599452198301 + }, + "dragging": true + }, + { + "width": 160, + "height": 160, + "id": "REVERSE_VECTOR-faee7c80-8640-465e-8f57-584d8021439f", + "type": "TRANSFORMERS", + "data": { + "id": "REVERSE_VECTOR-faee7c80-8640-465e-8f57-584d8021439f", + "label": "REVERSE VECTOR", + "func": "REVERSE_VECTOR", + "type": "TRANSFORMERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "Reversed input vector" + } + ], + "path": "TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/REVERSE_VECTOR.py", + "selected": false + }, + "position": { + "x": 85.8239507676396, + "y": -76.84429008650511 + }, + "selected": false, + "positionAbsolute": { + "x": 85.8239507676396, + "y": -76.84429008650511 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-6f1e7e4a-06d1-4022-b1c3-213e27591fc0", + "sourceHandle": "default", + "target": "REVERSE_VECTOR-faee7c80-8640-465e-8f57-584d8021439f", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-6f1e7e4a-06d1-4022-b1c3-213e27591fc0default-REVERSE_VECTOR-faee7c80-8640-465e-8f57-584d8021439fdefault" + }, + { + "source": "REVERSE_VECTOR-faee7c80-8640-465e-8f57-584d8021439f", + "sourceHandle": "default", + "target": "LINE-aba31de1-3e7a-4d93-ae7c-58abc570a66d", + "targetHandle": "default", + "id": "reactflow__edge-REVERSE_VECTOR-faee7c80-8640-465e-8f57-584d8021439fdefault-LINE-aba31de1-3e7a-4d93-ae7c-58abc570a66ddefault" + }, + { + "source": "LINSPACE-6f1e7e4a-06d1-4022-b1c3-213e27591fc0", + "sourceHandle": "default", + "target": "LINE-8723415f-a2db-4e46-b21b-9b1b72206821", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-6f1e7e4a-06d1-4022-b1c3-213e27591fc0default-LINE-8723415f-a2db-4e46-b21b-9b1b72206821default" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/examples/EX1/example.md new file mode 100644 index 000000000..6d2dfc7d9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/REVERSE_VECTOR/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we generate a vector type data using `LINESPACE` node. + +Using `REVERSE_VECTOR` node, we reverse the elements of the data and visualize it using `LINE` node \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/SHUFFLE_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/SHUFFLE_VECTOR.md new file mode 100644 index 000000000..ae6230e96 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/SHUFFLE_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..5ae235313 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,11 @@ +The SHUFFLE_VECTOR node returns a vector that is randomly shuffled + + Inputs + ------ + default : Vector + The input vector + + Returns + ------- + Vector + Shuffled input vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..d0e17082f --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,13 @@ +from numpy.random import permutation +from flojoy import flojoy, Vector + + +@flojoy +def SHUFFLE_VECTOR( + default: Vector, +) -> Vector: + + + shuffledVector = permutation(default.v) + + return Vector(v=shuffledVector) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/examples/EX1/app.json new file mode 100644 index 000000000..1958e7953 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/examples/EX1/app.json @@ -0,0 +1,234 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 208, + "height": 96, + "id": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 1000 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "PYTHON/nodes/GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -446.6779449770943, + "y": 76.62739294025627 + }, + "selected": false, + "positionAbsolute": { + "x": -446.6779449770943, + "y": 76.62739294025627 + }, + "dragging": true + }, + { + "width": 160, + "height": 160, + "id": "SHUFFLE_VECTOR-98d9999c-0019-4249-8ab9-a202b2c0f811", + "type": "TRANSFORMERS", + "data": { + "id": "SHUFFLE_VECTOR-98d9999c-0019-4249-8ab9-a202b2c0f811", + "label": "SHUFFLE VECTOR", + "func": "SHUFFLE_VECTOR", + "type": "TRANSFORMERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "Unique input vector" + } + ], + "path": "TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/SHUFFLE_VECTOR.py", + "selected": true + }, + "position": { + "x": -125.88341540346411, + "y": 198.83904817756536 + }, + "selected": true, + "positionAbsolute": { + "x": -125.88341540346411, + "y": 198.83904817756536 + }, + "dragging": true + }, + { + "width": 380, + "height": 293, + "id": "SCATTER-dd00a29c-158a-4406-bcc3-ca3ebe181c37", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-dd00a29c-158a-4406-bcc3-ca3ebe181c37", + "label": "SCATTER", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 215.3314964598046, + "y": 110.53771696595487 + }, + "selected": false, + "positionAbsolute": { + "x": 215.3314964598046, + "y": 110.53771696595487 + }, + "dragging": true + }, + { + "width": 380, + "height": 293, + "id": "SCATTER-0de9ba77-fa39-463c-af22-9b0aa0f44ee4", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-0de9ba77-fa39-463c-af22-9b0aa0f44ee4", + "label": "SCATTER 1", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": -176.0953148241946, + "y": -186.43591335855123 + }, + "selected": false, + "positionAbsolute": { + "x": -176.0953148241946, + "y": -186.43591335855123 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "sourceHandle": "default", + "target": "SCATTER-0de9ba77-fa39-463c-af22-9b0aa0f44ee4", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0default-SCATTER-0de9ba77-fa39-463c-af22-9b0aa0f44ee4default" + }, + { + "source": "SHUFFLE_VECTOR-98d9999c-0019-4249-8ab9-a202b2c0f811", + "sourceHandle": "default", + "target": "SCATTER-dd00a29c-158a-4406-bcc3-ca3ebe181c37", + "targetHandle": "default", + "id": "reactflow__edge-SHUFFLE_VECTOR-98d9999c-0019-4249-8ab9-a202b2c0f811default-SCATTER-dd00a29c-158a-4406-bcc3-ca3ebe181c37default" + }, + { + "source": "LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0", + "sourceHandle": "default", + "target": "SHUFFLE_VECTOR-98d9999c-0019-4249-8ab9-a202b2c0f811", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-2ed49441-b754-466d-83ed-a67759f7f6c0default-SHUFFLE_VECTOR-98d9999c-0019-4249-8ab9-a202b2c0f811default" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/examples/EX1/example.md new file mode 100644 index 000000000..e32fe97f2 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SHUFFLE_VECTOR/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we generate a vector type data using `LINSPACE` node. + +Using `SHUFFLE_VECTOR`, we randomly shuffle the elements and visualize it using `SCATTER` node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/SORT_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/SORT_VECTOR.md new file mode 100644 index 000000000..b9d4a257c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/SORT_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..e0b1d3fc1 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,11 @@ +The SORT_VECTOR node returns the input Vector that is sorted + + Inputs + ------ + default : Vector + The input vector + + Returns + ------- + Vector + Sorted input vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..e908201a2 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,10 @@ +from flojoy import flojoy, Vector + + +@flojoy +def SORT_VECTOR( + default: Vector, +) -> Vector: + + + return Vector(v=sorted(default.v)) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/examples/EX1/app.json new file mode 100644 index 000000000..cb13bdc95 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/examples/EX1/app.json @@ -0,0 +1,234 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 225, + "height": 226, + "id": "SCATTER-7f4fe283-a146-485b-8793-e5a07ae339ff", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-7f4fe283-a146-485b-8793-e5a07ae339ff", + "label": "SCATTER", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": true + }, + "position": { + "x": 289.4898933887987, + "y": -161.67635175269595 + }, + "selected": true, + "positionAbsolute": { + "x": 289.4898933887987, + "y": -161.67635175269595 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "SCATTER-f2735caa-777c-4364-b261-bca394ce4fb9", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-f2735caa-777c-4364-b261-bca394ce4fb9", + "label": "SCATTER 1", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": -20.152067256387554, + "y": -431.7368995199853 + }, + "selected": false, + "positionAbsolute": { + "x": -20.152067256387554, + "y": -431.7368995199853 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-03ef9f1a-dbb3-4082-8835-ebf2845f914f", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-03ef9f1a-dbb3-4082-8835-ebf2845f914f", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 1000 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -361.6088100911893, + "y": -221.27586586241438 + }, + "selected": false, + "positionAbsolute": { + "x": -361.6088100911893, + "y": -221.27586586241438 + }, + "dragging": true + }, + { + "width": 160, + "height": 160, + "id": "SORT_VECTOR-8a748763-ae9d-421f-b07a-8fc5a8eae218", + "type": "TRANSFORMERS", + "data": { + "id": "SORT_VECTOR-8a748763-ae9d-421f-b07a-8fc5a8eae218", + "label": "SORT VECTOR", + "func": "SORT_VECTOR", + "type": "TRANSFORMERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "multiple": false, + "desc": null + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "Sorted input vector" + } + ], + "path": "TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/SORT_VECTOR.py", + "selected": false + }, + "position": { + "x": -13.410053874852196, + "y": -120.88090981304643 + }, + "selected": false, + "positionAbsolute": { + "x": -13.410053874852196, + "y": -120.88090981304643 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-03ef9f1a-dbb3-4082-8835-ebf2845f914f", + "sourceHandle": "default", + "target": "SCATTER-f2735caa-777c-4364-b261-bca394ce4fb9", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-03ef9f1a-dbb3-4082-8835-ebf2845f914fdefault-SCATTER-f2735caa-777c-4364-b261-bca394ce4fb9default" + }, + { + "source": "SORT_VECTOR-8a748763-ae9d-421f-b07a-8fc5a8eae218", + "sourceHandle": "default", + "target": "SCATTER-7f4fe283-a146-485b-8793-e5a07ae339ff", + "targetHandle": "default", + "id": "reactflow__edge-SORT_VECTOR-8a748763-ae9d-421f-b07a-8fc5a8eae218default-SCATTER-7f4fe283-a146-485b-8793-e5a07ae339ffdefault" + }, + { + "source": "LINSPACE-03ef9f1a-dbb3-4082-8835-ebf2845f914f", + "sourceHandle": "default", + "target": "SORT_VECTOR-8a748763-ae9d-421f-b07a-8fc5a8eae218", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-03ef9f1a-dbb3-4082-8835-ebf2845f914fdefault-SORT_VECTOR-8a748763-ae9d-421f-b07a-8fc5a8eae218default" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/examples/EX1/example.md new file mode 100644 index 000000000..1a8f6ceea --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SORT_VECTOR/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we create a Vector type data that is in descending order using `LINSPACE`. + +Using `SORT_VECTOR` node, we sort the Vector type data in ascending order. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/SPLIT_VECTOR.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/SPLIT_VECTOR.md new file mode 100644 index 000000000..4b53156bc --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/SPLIT_VECTOR.md @@ -0,0 +1,57 @@ + +[//]: # (Custom component imports) + +import DocString from '@site/src/components/DocString'; +import PythonCode from '@site/src/components/PythonCode'; +import AppDisplay from '@site/src/components/AppDisplay'; +import SectionBreak from '@site/src/components/SectionBreak'; +import AppendixSection from '@site/src/components/AppendixSection'; + +[//]: # (Docstring) + +import DocstringSource from '!!raw-loader!./a1-[autogen]/docstring.txt'; +import PythonSource from '!!raw-loader!./a1-[autogen]/python_code.txt'; + +{DocstringSource} +{PythonSource} + + + + + +[//]: # (Examples) + +## Examples + +import Example1 from './examples/EX1/example.md'; +import App1 from '!!raw-loader!./examples/EX1/app.json'; + + + + + {App1} + + + + + + + + +[//]: # (Appendix) + +import Notes from './appendix/notes.md'; +import Hardware from './appendix/hardware.md'; +import Media from './appendix/media.md'; + +## Appendix + + + + + + diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/a1-[autogen]/docstring.txt new file mode 100644 index 000000000..304f42d3e --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/a1-[autogen]/docstring.txt @@ -0,0 +1,16 @@ +The SPLIT_VECTOR node returns a vector that is splited by a given index + + Inputs + ------ + default : Vector + The input vector + + Parameters + ---------- + index : int + index which you want to split your vector by + + Returns + ------- + Vector + Splited input vector diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/a1-[autogen]/python_code.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/a1-[autogen]/python_code.txt new file mode 100644 index 000000000..815050c8e --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/a1-[autogen]/python_code.txt @@ -0,0 +1,23 @@ +from numpy.random import permutation +from flojoy import flojoy, Vector +from typing import TypedDict +from sklearn.model_selection import train_test_split + + +class resultSplit(TypedDict): + vector1: Vector + vector2: Vector + + +@flojoy +def SPLIT_VECTOR( + default: Vector, + index: int = 0, +) -> resultSplit: + + if index > len(default.v) - 1: + raise ValueError(f"Given index is larger than the input vector, index: {index}") + + return resultSplit( + vector1=Vector(default.v[:index]), vector2=Vector(default.v[index:]) + ) diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/hardware.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/hardware.md new file mode 100644 index 000000000..7f78a555c --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/hardware.md @@ -0,0 +1 @@ +This node does not require any peripheral hardware to operate. Please see INSTRUMENTS for nodes that interact with the physical world through connected hardware. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/media.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/media.md new file mode 100644 index 000000000..8bcee9be9 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/media.md @@ -0,0 +1 @@ +No supporting screenshots, photos, or videos have been added to the media.md file for this node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/notes.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/notes.md new file mode 100644 index 000000000..04aded2ec --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/appendix/notes.md @@ -0,0 +1 @@ +No theory or technical notes have been contributed for this node yet. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/examples/EX1/app.json b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/examples/EX1/app.json new file mode 100644 index 000000000..3de018cd0 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/examples/EX1/app.json @@ -0,0 +1,250 @@ +{ + "rfInstance": { + "nodes": [ + { + "width": 160, + "height": 160, + "id": "SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834e", + "type": "TRANSFORMERS", + "data": { + "id": "SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834e", + "label": "SPLIT VECTOR", + "func": "SPLIT_VECTOR", + "type": "TRANSFORMERS", + "ctrls": { + "index": { + "type": "int", + "default": 0, + "desc": "index which you want to split your vector by", + "overload": null, + "functionName": "SPLIT_VECTOR", + "param": "index", + "value": 5 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "multiple": false, + "desc": "The input vector" + } + ], + "outputs": [ + { + "name": "vector1", + "id": "vector1", + "type": "Vector", + "desc": null + }, + { + "name": "vector2", + "id": "vector2", + "type": "Vector", + "desc": null + } + ], + "path": "TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/SPLIT_VECTOR.py", + "selected": false + }, + "position": { + "x": 54.537176517267866, + "y": -49.618422243917365 + }, + "selected": false, + "positionAbsolute": { + "x": 54.537176517267866, + "y": -49.618422243917365 + }, + "dragging": true + }, + { + "width": 208, + "height": 96, + "id": "LINSPACE-9c059168-e1f9-48d4-8b4f-71819705921b", + "type": "GENERATORS", + "data": { + "id": "LINSPACE-9c059168-e1f9-48d4-8b4f-71819705921b", + "label": "LINSPACE", + "func": "LINSPACE", + "type": "GENERATORS", + "ctrls": { + "start": { + "type": "float", + "default": 10, + "desc": "The start point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "start", + "value": 10 + }, + "end": { + "type": "float", + "default": 0, + "desc": "The end point of the data.", + "overload": null, + "functionName": "LINSPACE", + "param": "end", + "value": 0 + }, + "step": { + "type": "int", + "default": 1000, + "desc": "The number of points in the vector.", + "overload": null, + "functionName": "LINSPACE", + "param": "step", + "value": 10 + } + }, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "Vector|OrderedPair", + "multiple": false, + "desc": "Optional input in case LINSPACE is used in a loop. Not used." + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Vector", + "desc": "v: the vector between start and end with step number of points." + } + ], + "path": "GENERATORS/SIMULATIONS/LINSPACE/LINSPACE.py", + "selected": false + }, + "position": { + "x": -278.74012053762044, + "y": -18.66135755060509 + }, + "selected": false, + "positionAbsolute": { + "x": -278.74012053762044, + "y": -18.66135755060509 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "SCATTER-76a0e5d9-3b96-49ed-8b3e-96924e0df1fa", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-76a0e5d9-3b96-49ed-8b3e-96924e0df1fa", + "label": "SCATTER", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 326.2489442177936, + "y": 51.64274049118558 + }, + "selected": false, + "positionAbsolute": { + "x": 326.2489442177936, + "y": 51.64274049118558 + }, + "dragging": true + }, + { + "width": 225, + "height": 226, + "id": "SCATTER-7903ae78-384f-4e4b-b2eb-2beb1b205a08", + "type": "VISUALIZERS", + "data": { + "id": "SCATTER-7903ae78-384f-4e4b-b2eb-2beb1b205a08", + "label": "SCATTER 1", + "func": "SCATTER", + "type": "VISUALIZERS", + "ctrls": {}, + "initCtrls": {}, + "inputs": [ + { + "name": "default", + "id": "default", + "type": "OrderedPair|DataFrame|Matrix|Vector", + "multiple": false, + "desc": "the DataContainer to be visualized" + } + ], + "outputs": [ + { + "name": "default", + "id": "default", + "type": "Plotly", + "desc": "the DataContainer containing Plotly Scatter visualization" + } + ], + "path": "VISUALIZERS/PLOTLY/SCATTER/SCATTER.py", + "selected": false + }, + "position": { + "x": 328.89276225866735, + "y": -250.33841381618652 + }, + "selected": false, + "positionAbsolute": { + "x": 328.89276225866735, + "y": -250.33841381618652 + }, + "dragging": true + } + ], + "edges": [ + { + "source": "LINSPACE-9c059168-e1f9-48d4-8b4f-71819705921b", + "sourceHandle": "default", + "target": "SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834e", + "targetHandle": "default", + "id": "reactflow__edge-LINSPACE-9c059168-e1f9-48d4-8b4f-71819705921bdefault-SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834edefault" + }, + { + "source": "SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834e", + "sourceHandle": "vector1", + "target": "SCATTER-7903ae78-384f-4e4b-b2eb-2beb1b205a08", + "targetHandle": "default", + "id": "reactflow__edge-SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834evector1-SCATTER-7903ae78-384f-4e4b-b2eb-2beb1b205a08default" + }, + { + "source": "SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834e", + "sourceHandle": "vector2", + "target": "SCATTER-76a0e5d9-3b96-49ed-8b3e-96924e0df1fa", + "targetHandle": "default", + "id": "reactflow__edge-SPLIT_VECTOR-2c142043-09ad-4c8b-b70f-20a11e7e834evector2-SCATTER-76a0e5d9-3b96-49ed-8b3e-96924e0df1fadefault" + } + ], + "viewport": { + "x": 856.9726609784543, + "y": 419.56285211681103, + "zoom": 0.8897660042407147 + } + } +} \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/examples/EX1/example.md b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/examples/EX1/example.md new file mode 100644 index 000000000..a6fd43a88 --- /dev/null +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/SPLIT_VECTOR/examples/EX1/example.md @@ -0,0 +1,3 @@ +In this example, we generate a vector type data using `LINSPACE` node. + +Using `SPLIT_VECTOR`, split the vector type into two different vectors by its index and visualize using `SCATTER` node. \ No newline at end of file diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_INDEXING/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_INDEXING/a1-[autogen]/docstring.txt index c525cc796..f035944c8 100644 --- a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_INDEXING/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_INDEXING/a1-[autogen]/docstring.txt @@ -1,9 +1,8 @@ -The VECTOR_INDEXING node returns the value of the Vector at the - requested index. +The VECTOR_INDEXING node returns the value of the vector at the requested index. Inputs ------ - v : Vector + v : vector The input vector to index. Parameters diff --git a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_LENGTH/a1-[autogen]/docstring.txt b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_LENGTH/a1-[autogen]/docstring.txt index 7017eb5e2..28c55e0d8 100644 --- a/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_LENGTH/a1-[autogen]/docstring.txt +++ b/docs/nodes/TRANSFORMERS/VECTOR_MANIPULATION/VECTOR_LENGTH/a1-[autogen]/docstring.txt @@ -1,8 +1,8 @@ -The VECTOR_LENGTH node returns the length of the input +The VECTOR_LENGTH node returns the length of the input. Inputs ------ - v : Vector + v : vector The input vector to find the length of. Returns diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt index 3bea08e93..52102e2d0 100644 --- a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/ARRAY_VIEW/a1-[autogen]/docstring.txt @@ -1,12 +1,11 @@ -The ARRAY_VIEW node takes "OrderedPair", "DataFrame", "Matrix", and "Image" objects of DataContainer class as input - and displays its visualization in an array format. +The ARRAY_VIEW node takes OrderedPair, DataFrame, Matrix, and Image DataContainer objects as input, and visualizes it in array format. Inputs ------ default : OrderedPair | DataFrame | Matrix | Image - the DataContainer to be visualized in an array format + the DataContainer to be visualized in array format Returns ------- Plotly - the DataContainer containing visualization of the input in an array format + the DataContainer containing the visualization of the input in array format diff --git a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt index 4eebce32e..8728a2f18 100644 --- a/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/DATA_STRUCTURE/MATRIX_VIEW/a1-[autogen]/docstring.txt @@ -1,8 +1,7 @@ -The MATRIX_VIEW node takes a Matrix or OrderedPair object of DataContainer class as input and - displays its visualization using a Plotly table in matrix format. +The MATRIX_VIEW node takes a Matrix or OrderedPair DataContainer object as input, and visualizes it using a Plotly table in matrix format. Inputs - ------- + ------ default : OrderedPair | Matrix the DataContainer to be visualized in matrix format. diff --git a/docs/nodes/VISUALIZERS/PLOTLY/BAR/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/BAR/a1-[autogen]/docstring.txt index 50ef165cd..c39f6423d 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/BAR/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/BAR/a1-[autogen]/docstring.txt @@ -1,11 +1,11 @@ -The BAR node creates a Plotly Bar visualization for a given input data container. +The BAR node creates a Plotly Bar visualization for a given input DataContainer. Inputs ------ default : OrderedPair|DataFrame|Matrix|Vector - the DataContainer to be visualized in bar chart + the DataContainer to be visualized in a bar chart Returns ------- Plotly - the DataContainer containing Plotly Bar chart visualization + the DataContainer containing the Plotly Bar chart visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/BIG_NUMBER/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/BIG_NUMBER/a1-[autogen]/docstring.txt index 3af43a98c..7ed5044c7 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/BIG_NUMBER/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/BIG_NUMBER/a1-[autogen]/docstring.txt @@ -8,15 +8,15 @@ The BIG_NUMBER node generates a Plotly figure, displaying a big number with an o Parameters ---------- relative_delta : bool - whether to show relative delta from last run along with big number + whether or not to show the relative delta from the last run along with big number suffix : str any suffix to show with big number prefix : str any prefix to show with big number title : str - title of the plot, default "BIG_NUMBER" + title of the plot, default = "BIG_NUMBER" Returns ------- Plotly - the DataContainer containing Plotly big number visualization + the DataContainer containing the Plotly big number visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/HEATMAP/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/HEATMAP/a1-[autogen]/docstring.txt index 1004d7fdd..ee7ce35a6 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/HEATMAP/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/HEATMAP/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The HEATMAP node creates a Plotly Heatmap visualization for a given input data container. +The HEATMAP node creates a Plotly Heatmap visualization for a given input DataContainer. Inputs ------ @@ -8,12 +8,12 @@ The HEATMAP node creates a Plotly Heatmap visualization for a given input data c Parameters ---------- show_text : bool - whether to show the text inside the heatmap color blocks + whether or not to show the text inside the heatmap color blocks histogram : bool whether or not to render a histogram of the image next to the render Returns ------- Plotly - the DataContainer containing Plotly heatmap visualization + the DataContainer containing the Plotly heatmap visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/HISTOGRAM/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/HISTOGRAM/a1-[autogen]/docstring.txt index dd2b17b73..27aeaec85 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/HISTOGRAM/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/HISTOGRAM/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The HISTOGRAM node creates a Plotly Histogram visualization for a given input data container. +The HISTOGRAM node creates a Plotly Histogram visualization for a given input DataContainer. Inputs ------ @@ -8,4 +8,4 @@ The HISTOGRAM node creates a Plotly Histogram visualization for a given input da Returns ------- Plotly - the DataContainer containing Plotly Histogram visualization + the DataContainer containing the Plotly Histogram visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/IMAGE/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/IMAGE/a1-[autogen]/docstring.txt index 115e446b1..20efb15aa 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/IMAGE/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/IMAGE/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The IMAGE node creates a Plotly Image visualization for a given input data container type of image. +The IMAGE node creates a Plotly Image visualization for a given input DataContainer type of image. Inputs ------ @@ -8,4 +8,4 @@ The IMAGE node creates a Plotly Image visualization for a given input data conta Returns ------- Plotly - the DataContainer containing Plotly Image visualization of the input image + the DataContainer containing the Plotly Image visualization of the input image diff --git a/docs/nodes/VISUALIZERS/PLOTLY/LINE/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/LINE/a1-[autogen]/docstring.txt index 72ed8c43d..20022112e 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/LINE/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/LINE/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The LINE node creates a Plotly Line visualization for a given input data container. +The LINE node creates a Plotly Line visualization for a given input DataContainer. Inputs ------ @@ -8,4 +8,4 @@ The LINE node creates a Plotly Line visualization for a given input data contain Returns ------- Plotly - the DataContainer containing Plotly Line visualization of the input data + the DataContainer containing the Plotly Line visualization of the input data diff --git a/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_COMPONENTS/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_COMPONENTS/a1-[autogen]/docstring.txt index ccac75493..e01e8dec7 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_COMPONENTS/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_COMPONENTS/a1-[autogen]/docstring.txt @@ -1,11 +1,12 @@ The PROPHET_COMPONENTS node plots the components of the prophet model trained in the PROPHET_PREDICT node. - This is the output plotly graph from the "plot_components_plotly" function from "prophet.plot". + + This is the output plotly graph from the 'plot_components_plotly' function from 'prophet.plot'. It expects the trained Prophet model from the PROPHET_PREDICT node as input. - If "run_forecast" was True in that node, the forecasted dataframe will be available as the "m" attribute of the default input. - Otherwise, this will make the predictions on the raw dataframe (in which case it will be the "m" attribute of the default input). + If 'run_forecast' was True in that node, the forecasted dataframe will be available as the 'm' attribute of the default input. + Otherwise, this will make the predictions on the raw dataframe (in which case it will be the 'm' attribute of the default input). - You can tell if that forecasted dataframe is available via the "extra" field of data input, "run_forecast" (data.extra["run_forecast"]). + You can tell if that forecasted dataframe is available via the 'extra' field of data input, 'run_forecast' (data.extra["run_forecast"]). Inputs ------ @@ -13,7 +14,7 @@ The PROPHET_COMPONENTS node plots the components of the prophet model trained in the DataContainer to be visualized data : DataContainer - the DataContainer that holds prophet model and forecast data in the `extra` field + the DataContainer that holds prophet model and forecast data in the 'extra' field Parameters @@ -28,4 +29,4 @@ The PROPHET_COMPONENTS node plots the components of the prophet model trained in Returns ------- Plotly - the DataContainer containing Plotly visualization of the prophet model + the DataContainer containing the Plotly visualization of the prophet model diff --git a/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_PLOT/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_PLOT/a1-[autogen]/docstring.txt index 73a9cacff..1387e5f2e 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_PLOT/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/PROPHET_PLOT/a1-[autogen]/docstring.txt @@ -1,11 +1,12 @@ The PROPHET_PLOT node plots the forecasted trend of the time series data that was passed in. - This is the output plotly graph from the "plot_plotly" function from "prophet.plot". + + This is the output plotly graph from the 'plot_plotly' function from 'prophet.plot'. It expects the trained Prophet model from the PROPHET_PREDICT node as input. - If "run_forecast" was True in that node, the forecasted dataframe will be available as the "m" attribute of the default input. - Otherwise, this will make the predictions on the raw dataframe (in which case it will be the "m" attribute of the default input). + If 'run_forecast' was True in that node, the forecasted dataframe will be available as the 'm' attribute of the default input. + Otherwise, this will make the predictions on the raw dataframe (in which case it will be the 'm' attribute of the default input). - You can tell if that forecasted dataframe is available via the "extra" field of data input, "run_forecast" (data.extra["run_forecast"]). + You can tell if that forecasted dataframe is available via the 'extra' field of data input, 'run_forecast' (data.extra["run_forecast"]). Inputs ------ @@ -13,7 +14,7 @@ The PROPHET_PLOT node plots the forecasted trend of the time series data that wa the DataContainer to be visualized data : DataContainer - the DataContainer that holds the prophet model and forecast data in the `extra` field + the DataContainer that holds the prophet model and forecast data in the 'extra' field Parameters ---------- @@ -27,4 +28,4 @@ The PROPHET_PLOT node plots the forecasted trend of the time series data that wa Returns ------- Plotly - the DataContainer containing Plotly visualization of the prophet model + the DataContainer containing the Plotly visualization of the prophet model diff --git a/docs/nodes/VISUALIZERS/PLOTLY/SCATTER/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/SCATTER/a1-[autogen]/docstring.txt index fdcc69513..267da4d88 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/SCATTER/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/SCATTER/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The SCATTER node creates a Plotly Scatter visualization for a given input data container. +The SCATTER node creates a Plotly Scatter visualization for a given input DataContainer. Inputs ------ @@ -8,4 +8,4 @@ The SCATTER node creates a Plotly Scatter visualization for a given input data c Returns ------- Plotly - the DataContainer containing Plotly Scatter visualization + the DataContainer containing the Plotly Scatter visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/SCATTER3D/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/SCATTER3D/a1-[autogen]/docstring.txt index 130bd052e..124eb35e6 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/SCATTER3D/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/SCATTER3D/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The SCATTER3D node creates a Plotly 3D Scatter visualization for a given input data container. +The SCATTER3D node creates a Plotly 3D Scatter visualization for a given input DataContainer. Inputs ------ @@ -8,4 +8,4 @@ The SCATTER3D node creates a Plotly 3D Scatter visualization for a given input d Returns ------- Plotly - the DataContainer containing Plotly 3D Scatter visualization + the DataContainer containing the Plotly 3D Scatter visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/SURFACE3D/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/SURFACE3D/a1-[autogen]/docstring.txt index 7890bdb86..0b61956f3 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/SURFACE3D/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/SURFACE3D/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The SURFACE3D node creates a Plotly 3D Surface visualization for a given input data container. +The SURFACE3D node creates a Plotly 3D Surface visualization for a given input DataContainer. Inputs ------ @@ -8,5 +8,5 @@ The SURFACE3D node creates a Plotly 3D Surface visualization for a given input d Returns ------- Plotly - the DataContainer containing Plotly 3D Surface visualization + the DataContainer containing the Plotly 3D Surface visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/docstring.txt b/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/docstring.txt index bc301e205..d155f4a88 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/docstring.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/docstring.txt @@ -1,4 +1,4 @@ -The TABLE node creates a Plotly Table visualization for a given input data container. +The TABLE node creates a Plotly Table visualization for a given input DataContainer. Inputs ------ @@ -8,5 +8,4 @@ The TABLE node creates a Plotly Table visualization for a given input data conta Returns ------- Plotly - the DataContainer containing Plotly Table visualization - + the DataContainer containing the Plotly Table visualization diff --git a/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/python_code.txt b/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/python_code.txt index 976e1548d..f207438b4 100644 --- a/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/python_code.txt +++ b/docs/nodes/VISUALIZERS/PLOTLY/TABLE/a1-[autogen]/python_code.txt @@ -5,7 +5,7 @@ from nodes.VISUALIZERS.template import plot_layout @flojoy -def TABLE(default: OrderedTriple | OrderedPair | DataFrame | Vector | Scalar) -> Plotly: +def TABLE(default: OrderedTriple | OrderedPair | DataFrame | Vector) -> Plotly: layout = plot_layout(title="TABLE") diff --git a/nodeSidebar.json b/nodeSidebar.json index 5838563b9..c40c20ba2 100644 --- a/nodeSidebar.json +++ b/nodeSidebar.json @@ -119,7 +119,9 @@ "ETL > Transform > Matrix Manipulation": [ "nodes/TRANSFORMERS/MATRIX_MANIPULATION/DOT_PRODUCT/DOT_PRODUCT", "nodes/TRANSFORMERS/MATRIX_MANIPULATION/INVERT/INVERT", - "nodes/TRANSFORMERS/MATRIX_MANIPULATION/MATMUL/MATMUL" + "nodes/TRANSFORMERS/MATRIX_MANIPULATION/MATMUL/MATMUL", + "nodes/TRANSFORMERS/MATRIX_MANIPULATION/SHUFFLE_MATRIX/SHUFFLE_MATRIX", + "nodes/TRANSFORMERS/MATRIX_MANIPULATION/SORT_MATRIX/SORT_MATRIX" ], "ETL > Transform > Type Casting": [ "nodes/TRANSFORMERS/TYPE_CASTING/DF_2_NP/DF_2_NP", @@ -166,6 +168,7 @@ "I/O > Oscilloscopes": [ "nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/ADVANCED_MEASUREMENTS_MDO3XXX/ADVANCED_MEASUREMENTS_MDO3XXX", "nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/ADVANCED/TRIGGER_SETTINGS_MDO3XXX/TRIGGER_SETTINGS_MDO3XXX", + "nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/CONNECTION_MDO3XXX/CONNECTION_MDO3XXX", "nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/EXTRACT_TRACE_MDO3XXX/EXTRACT_TRACE_MDO3XXX", "nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASUREMENTS_MDO3XXX/MEASUREMENTS_MDO3XXX", "nodes/IO/INSTRUMENTS/OSCILLOSCOPES/TEKTRONIX/MDO3XXX/BASIC/MEASURE_PHASE_MDO3XXX/MEASURE_PHASE_MDO3XXX", @@ -188,6 +191,7 @@ ], "I/O > SourceMeters": [ "nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/IV_SWEEP/IV_SWEEP", + "nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/OPEN_KEITHLEY_24XX/OPEN_KEITHLEY_24XX", "nodes/IO/INSTRUMENTS/SOURCEMETERS/KEITHLEY/24XX/BASIC/SET_VOLTAGE/SET_VOLTAGE" ], "NumPy > Linalg": [