From f8e4ff381d601a54f039e1f9ce4543b4915ad5f7 Mon Sep 17 00:00:00 2001 From: sbosse Date: Fri, 29 Nov 2024 16:31:06 +0100 Subject: [PATCH] Fri 29 Nov 2024 04:30:50 PM CET --- src/SimNDT/core/transducer.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/SimNDT/core/transducer.py diff --git a/src/SimNDT/core/transducer.py b/src/SimNDT/core/transducer.py new file mode 100644 index 0000000..4658b5b --- /dev/null +++ b/src/SimNDT/core/transducer.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# encoding: utf-8 +""" +transducer.py + +Created by Miguel Molero on 2013-09-25. +Copyright (c) 2013 MMolero. All rights reserved. +""" + + + +class Transducer: + + def __init__(self, name='emisor', Size=10, CenterOffset=0, BorderOffset=0, Location="Top", + PointSource=False, EnableWindow=False, Field=False, PZT=False): + self.Name = name + self.Size = Size + self.CenterOffset = CenterOffset + self.BorderOffset = BorderOffset + self.SizePixel = 0 + self.Location = Location + self.PointSource = PointSource + self.Window = EnableWindow + self.Field = Field + self.PZT = PZT + + def __str__(self): + return "Transducer(Name={}, Size={}, CenterOffset={}, BorderOffset={}, Location={}, PointSource={}, Window={}, Field={}, PZT={})".format( + self.Name, self.Size, self.CenterOffset, self.BorderOffset, self.Location, self.PointSource, self.Window, self.Field, self.PZT) + + def __repr__(self): + return self.__str__()