maodevice.correlator module

class maodevice.correlator.OctadS(com)[source]

Bases: maodevice.core.BaseDeviceHandler

Control “OCTAD-S”.

The OCTAD-S is the FPGA-based correlator.

Note

This class is based on “maodevice.core.BaseDeviceHandler”.

Parameters:com (maodevice.communicator) – Communicator instance to control the device.
MANUFACTURER

Manufacturer of the device.

Type:str
PRODUCT_NAME

Name of the device.

Type:str
CLASSIFICATION

Classification of the device.

Type:str
CLASSFICATION = 'Correlator'
CORRELATION_MODE = {'Auto1': 1, 'Auto2': 2, 'Cross1-2': 16}
MANUFACTURER = 'Elecs'
PRODUCT_NAME = 'OCTAD-S'
calibrate_de_multiplexer(n)[source]

Calibrate the data transfer from the ADC to the FPGA.

Notes

  • Execute this method only when “show_status” shows “DBBC_module_adc_de-multiplexer_bit-alignment_error”.
  • This method may take up to several minutes to complete.
  • You must execute “synchronize_with_external” after executing this method.
Parameters:n (int) – ADC number. Allowed values are 1 or 2.
Returns:None
restart()[source]

Restart “OCTAD-S”.

Returns:None
select_correlation_scaling(n, scale=0)[source]

Set scaling of X (Correlation) part.

Note

The mean of thread ID are as follows. 1. Auto-correlation of channel 1 2. Auto-correlation of channel 2 5. Cross-correlation of channels 1 and 2

Parameters:
  • n (int) – Thread ID. Allowed values are 1, 2 or 5.
  • scale (int) – Scaling of X (Correlation) part. Set within the range of 0 - 31. Defaults to 0.
Returns:

None

select_integration_time(integ_time=5)[source]

Select integration time.

Parameters:integ_time (int) – Integration time. Allowed values are 5 or 10 (msec). Defaults to 5.
Returns:None
select_repeat_response(is_repeat=False)[source]

Select whether to output the repeat message.

Parameters:is_repeat (bool) – Response indicator. If it is true, output the repeat message.
Returns:None
select_requantization_scaling(n, scale=0)[source]

Set scaling of Y (Requantization) part.

Parameters:
  • n (int) – ADC number. Allowed values are 1 or 2.
  • scale (int) – Scaling of Y (Requantization) part. Set within the range of 0 - 31. Defaults to 0.
Returns:

None

set_adc_delay_offset(n, offset=16384)[source]

Set the delay offset of ADC.

Parameters:
  • n (int) – ADC number. Allowed values are 1 or 2.
  • offset (int) – Delay offset of ADC. You must set within the range of 0 - 32767. Defaults to 16384.
Returns:

None

set_adc_dynamic_range(n, d_range=256.0, offset=0.0)[source]

Set dynamic range of ADC.

Note

Do not change the dynamic range as much as possible.

Parameters:
  • n (int) – ADC number. Allowed values are 1 or 2.
  • d_range (float) – Dynamic range of ADC. Set within the range of 240.0 - 270.0. Defaults to 256.0.
  • offset (float) – Offset voltage of ADC dynamic range. Set within the range of -128.0 - 128.0. Defaults to 0.0.
Returns:

None

set_control_port_ip(ip)[source]

Set IP address of the control port.

Note

You must restart after executing thie method.

Parameters:ip (str) – IP address of the control port.
Returns:None
set_control_port_subnet_mask(mask)[source]

Set subnet mask of the control port.

Notes

  • You must restart after executing this method.
  • The subnet mask of the 10G port is the same as this one.
Parameters:mask (str) – Subnet mask of the control port.
Returns:None
set_date(year, doy, hour, minute, second)[source]

Set the date to add to sampling data.

Notes

  • You must execute this method after the method “synchronize_with_external”.
  • You do not need to execute this method if you use a NTP server.
Parameters:
  • year (int) – Year.
  • doy (int) – Day of the year.
  • hour (int) – Hour.
  • minute (int) – Minute.
  • second (int) – Second.
Returns:

None

set_gigabit_ethernet_ip(ip)[source]

Set IP address of the Gigabit ethernet.

Note

You must restart after executing this method.

Parameters:ip (str) – IP address of the Gigabit ethernet.
Returns:None
set_mask_time_of_integration(mask_time=0)[source]

Set the time to mask integration.

Note

You set this time by FFT segment unit. (e.g. 2000 FFT segment is 2 ms)

Parameters:mask_time (int) – Time to mask integration. You must set within the range of 0 - 2000.
Returns:None
set_ntp_ip(ip)[source]

Set IP address of a NTP server.

Notes

  • You must restart or execute “synchronize_with_external” after execution of this method.
  • You set the IP address “0.0.0.0” to disable the SNTP function.
Parameters:ip (str) – IP address of a NTP server.
Returns:None
set_vdif_destination_ip(n, ip)[source]

Set the destination IP address of VDIF.

Note

The mean of thread ID are as follows. 1. Auto-correlation of channel 1 2. Auto-correlation of channel 2 5. Cross-correlation of channels 1 and 2

Parameters:
  • n (int) – Thread ID. Allowed values are 1, 2 or 5.
  • ip (str) – Destination IP address of VDIF.
Returns:

None

set_vdif_destination_port(n, port)[source]

Set the destination UDP port of VDIF.

Note

The mean of thread ID are as follows. 1. Auto-correlation of channel 1 2. Auto-correlation of channel 2 5. Cross-correlation of channels 1 and 2

Parameters:
  • n (int) – Thread ID. Allowed values are 1, 2 or 5.
  • port (int) – Destination UDP port of VDIF.
Returns:

None

set_window_function(win_func='none')[source]

Set the window function of FFT.

Note

You can choose window functions as follows. - None - Hamming - Hanning - Blackman

Parameters:win_func (str) – Window function of FFT. Select one of “nont”, “hamming”, “hanning” or “blackman”. Defaults to “none”.
Returns:None
show_1pps_gap()[source]

Show the gap between internal 1PPS and external one.

Returns:The 1PPS gap (ns).
Return type:ret (bytes)
show_adc_sampling_bit(n)[source]

Show the bit distribution after sampling with ADC.

Parameters:n (int) – ADC number. Allowed values are 1 or 2.
Returns:Bit distribution.
Return type:ret (bytes)
show_fpga_power(n)[source]

Show the power supply voltage measured by FPGA.

Parameters:n (int) – Module number. If n = 1 to 4, it corresponds to DSP module <n>, and when n = 5 it corresponds to output module. Allowed values are 1, 2, 3, 4 or 5.
Returns:Power supply voltage.
Return type:ret (bytes)
show_status()[source]

Show malfunctions occured now or in the past.

Note

Since it is READ & CLEAR, alarms that occured in the past are displayed only once. Regarding the current ongoing alram, no matter how many times this command is issued, the alarm will be displayed.

Returns:Status string.
Return type:ret (bytes)
show_system()[source]

Show various information of “OCTAD-S”.

Returns:Information of “OCTAD-S”.
Return type:ret (bytes)
show_temperature()[source]

Show FPGA junction temperature.

Returns:FPGA junction temperature.
Return type:ret (bytes)
start_correlation(time, *mode)[source]

Start correlation.

stop_correlation(time)[source]

Stop correlation.

synchronize_with_external()[source]

Synchronize the device to an external synchronization signal.

Returns:None