Package: rs-fsl
:no_entry: [DEPRECATED] Functionality has been ported topymeasure.RS FSL ‒ Python interface for the Rohde-Schwarz FSL Spectrum AnalyzerInstallationTo installrs_fsl, runpip install rs_fslIf you plan to make changes to the code, usegit clone https://github.com/bleykauf/rs_fsl.git
cd rs_fsl
pip install .Usagefromrs_fslimportFSLConnecting to the instrument. If the RS FSL is not connected to the phyics network, the address might be different and can be set manually with theipkeyword.fsl=FSL(ip='141.20.46.198')SuccessfullyconnectedtoRohde&Schwarz,FSL-18,100193/018,2.30Getting and setting parametersMost parameters are implemented as properties in python, which means they can be read and written (getting and setting) in a consistent and simple way. If numerical values are provided, base units are used (seconds, hertz, decibel,...).# Getting the current center frequencyfsl.freq_center9000000000.0# Changing it to 10 MHz by providing the numerical valuefsl.freq_center=10e6# Verifying:fsl.freq_center10000000.0# Changing it to 1 GHz by providing a string and verifying the resultfsl.freq_center='9GHz'fsl.freq_center9000000000.0# Setting the span to maximumfsl.freq_span='7GHz'Reading a traceWe will read the current tracex,y=fsl.read_trace()MarkersMarkers are implemented as their own class. You can create them like this:m1=fsl.create_marker()Set peak exursion:m1.peak_excursion=3Set marker to a specific position:m1.x=10e9Find the next peak to the left and get the level:m1.to_next_peak('left')m1.y-34.9349060059Delta markersDelta markers can be created by setting the appropriate keyword.d2=fsl.create_marker(is_delta_marker=True)d2.name'DELT2'A example programProgram for measuring a beatnotem1=fsl.create_marker()# create marker 1# Set standard settings, set to full spanfsl.continuous_sweep=Falsefsl.freq_span='18 GHz'fsl.rbw="AUTO"fsl.vbw="AUTO"fsl.sweep_time="AUTO"# Perform a sweep on full span, set the marker to the peak and some to that markerfsl.single_sweep()m1.to_peak()m1.zoom('20 MHz')# take data from the zoomed-in regionfsl.single_sweep()x,y=fsl.read_trace()AuthorsBastian Leykauf (https://github.com/bleykauf)LicenseMIT LicenseCopyright © 2021 Bastian LeykaufPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.