src.kstconfig.nco
Handling .nco files.
At EISCAT, these are loaded by the numerical controlled oscillator. These shift frequency of the signal that comes into a channel. When reading these files, one should be aware of that when the signal comes into the channels, its frequency already is shifted twice.
See also [Jussis EISCAT portal] (https://portal.eiscat.se/jussi/eiscat/erosdoc/uhf_radar.html)
Classes
Parsing and handling of numerically controlled oscillator (NCO) files. |
Module Contents
- class src.kstconfig.nco.Nco(filename='NCOPAR_VS 0.1\nNCO 0 0.0', lo1=812, lo2=128)
Parsing and handling of numerically controlled oscillator (NCO) files.
- Parameters:
filename (str)
lo1 (float)
lo2 (float)
- _lo1 = 812
- _lo2 = 128
- static parse_nco(lines)
Parse lines from a nco file.
Can only parse whole file at once.
- Parameters:
lines (str) – lines in the file
- Raises:
RuntimeError – if the format of the file is not correct.
ValueError – if frequency is not a floating-point number.
- Returns:
list of frequencies for this experiment
- Return type:
list[float]
- set_freqs(freqs)
- Parameters:
freqs (list[float])
- Return type:
None
- set_lo1(lo1)
Set local oscillator 1 frequency.
- Parameters:
lo1 (float) – Frequency [MHz]
- Return type:
None
- set_lo2(lo2)
Set local oscillator 2 frequency.
- Parameters:
lo2 (float) – Frequency [MHz]
- Return type:
None
- NCOSEL(nr)
Select frequency of numerical controlled oscillator.
- Parameters:
nr (int) – Frequency number
- Return type:
None
- property is_ready: bool
Shows if corresponding channel board has a defined frequency already.
- Return type:
bool
If channel is not ready, there are several possibilities why: - There has not been loaded any .nco file for this channel yet. - The command NCOSEL has not been run yet.
The local oscillator frequencies have been decided, even if not explicitly. This is because EROS uses default oscillators. However, it is good practice to explicit tell EROS which oscillators to use.
- get_freq()
Return the centre frequency of this channel.
- Raises:
AttributeError – if frequency has not been selected
- Returns:
frequency [MHz]
- Return type:
float