The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Value Series: saving results of Extract Peak operator as macro / example set

ckck Member Posts: 4 Contributor I
edited November 2019 in Help

I am doing a "Fourier Transformation" and use the "Extract Peak" operator of the Value Series extension.

My problem is: how do i get the peak values out of the series world, like saving the results as macros or in a "normal" example set? If I use "Series to Data" I only get the "Fourier Transformation", but not the result of the peak extraction which seem to be called "single values" or "single attributes".

 

Here is a little example:

 

<?xml version="1.0" encoding="UTF-8"?><process version="7.2.002">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.2.002" expanded="true" name="Process">
<parameter key="logverbosity" value="status"/>
<process expanded="true">
<operator activated="true" class="series:generate_series_sinus" compatibility="7.2.000" expanded="true" height="68" name="Generate Series (Sinus)" width="90" x="45" y="34">
<list key="frequency">
<parameter key="1000.0" value="1.0"/>
<parameter key="600.0" value="2.0"/>
</list>
</operator>
<operator activated="true" class="series:window_transformation" compatibility="7.2.000" expanded="true" height="68" name="Window Transformation (3)" width="90" x="179" y="34"/>
<operator activated="true" class="series:fast_fourier_transformation" compatibility="7.2.000" expanded="true" height="68" name="Fast Fourier Transformation (2)" width="90" x="313" y="34">
<parameter key="frequency_rescaling" value="true"/>
<parameter key="sample_rate" value="44100.0"/>
</operator>
<operator activated="true" class="series:extract_peak" compatibility="7.2.000" expanded="true" height="68" name="Extract Peak" width="90" x="447" y="34"/>
<connect from_op="Generate Series (Sinus)" from_port="output" to_op="Window Transformation (3)" to_port="series"/>
<connect from_op="Window Transformation (3)" from_port="series" to_op="Fast Fourier Transformation (2)" to_port="series"/>
<connect from_op="Fast Fourier Transformation (2)" from_port="series" to_op="Extract Peak" to_port="series"/>
<connect from_op="Extract Peak" from_port="series" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>

Thanks in advance. :-)

Answers

  • ckck Member Posts: 4 Contributor I

    Just in case someone else is having that probem.
    I did not find a solution using the "Data to Series" / "Series to Data" combination, but could solve it with "Process Series".
    Had to transpose my Data for this operator and used "Extract Macro" to generate the needed End Attribute value.

    <?xml version="1.0" encoding="UTF-8"?><process version="7.2.003">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="7.2.003" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="generate_data" compatibility="7.2.003" expanded="true" height="68" name="Generate Data" width="90" x="45" y="34">
    <parameter key="target_function" value="simple sinus"/>
    <parameter key="number_examples" value="10000"/>
    <parameter key="number_of_attributes" value="1"/>
    <parameter key="attributes_lower_bound" value="0.0"/>
    <parameter key="attributes_upper_bound" value="50.0"/>
    </operator>
    <operator activated="true" class="extract_macro" compatibility="7.2.003" expanded="true" height="68" name="Extract Macro" width="90" x="179" y="34">
    <parameter key="macro" value="num_ex"/>
    <list key="additional_macros"/>
    </operator>
    <operator activated="true" class="select_attributes" compatibility="7.2.003" expanded="true" height="82" name="Select Attributes" width="90" x="313" y="34">
    <parameter key="attribute_filter_type" value="single"/>
    <parameter key="attribute" value="label"/>
    </operator>
    <operator activated="true" class="transpose" compatibility="7.2.003" expanded="true" height="82" name="Transpose" width="90" x="447" y="34"/>
    <operator activated="true" class="series:process_series" compatibility="7.2.000" expanded="true" height="82" name="Process Series" width="90" x="581" y="34">
    <parameter key="start_attribute" value="att_1"/>
    <parameter key="end_attribute" value="att_%{num_ex}"/>
    <parameter key="keep_old_single_attributes" value="false"/>
    <process expanded="true">
    <operator activated="true" class="series:window_transformation" compatibility="7.2.000" expanded="true" height="68" name="Window Transformation" width="90" x="45" y="34"/>
    <operator activated="true" class="series:fast_fourier_transformation" compatibility="7.2.000" expanded="true" height="68" name="Fast Fourier Transformation" width="90" x="246" y="34">
    <parameter key="frequency_rescaling" value="true"/>
    <parameter key="sample_rate" value="200.0"/>
    </operator>
    <operator activated="true" class="series:extract_peak" compatibility="7.2.000" expanded="true" height="68" name="Extract Peak" width="90" x="380" y="34"/>
    <connect from_port="series" to_op="Window Transformation" to_port="series"/>
    <connect from_op="Window Transformation" from_port="series" to_op="Fast Fourier Transformation" to_port="series"/>
    <connect from_op="Fast Fourier Transformation" from_port="series" to_op="Extract Peak" to_port="series"/>
    <connect from_op="Extract Peak" from_port="series" to_port="series"/>
    <portSpacing port="source_series" spacing="0"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_series" spacing="0"/>
    </process>
    </operator>
    <connect from_op="Generate Data" from_port="output" to_op="Extract Macro" to_port="example set"/>
    <connect from_op="Extract Macro" from_port="example set" to_op="Select Attributes" to_port="example set input"/>
    <connect from_op="Select Attributes" from_port="example set output" to_op="Transpose" to_port="example set input"/>
    <connect from_op="Transpose" from_port="example set output" to_op="Process Series" to_port="example set"/>
    <connect from_op="Process Series" from_port="example set" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>
    <portSpacing port="sink_result 3" spacing="0"/>
    </process>
    </operator>
    </process>
Sign In or Register to comment.