63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf,nilmtk/stats/totalenergy.py,,get_total_energy,#Any#Any#,39

Before Change


            // Preference is to calculate energy from 
            // native Energy data rather than Power data
            // so don"t overwrite with Power data.
            if not energy.has_key(ac_type):
                energy[ac_type] = _energy_for_power_series(
                    series, max_sample_period)
                data_source_rank[ac_type] = 3 // least favourite

After Change


    

    // Select a column based on ordered preferences
    PHYSICAL_QUANTITY_PREFS = ["cumulative energy", "energy", "power"]
    selected_columns = []
    for ac_type in AC_TYPES:
        physical_quantities = [physical_quantity 
                               for (physical_quantity, col_ac_type) in df.keys()
                               if col_ac_type == ac_type]
        for pq in PHYSICAL_QUANTITY_PREFS:
            if pq in physical_quantities:
                selected_columns.append((pq, ac_type))
                break

    energy = {}
    for col in selected_columns:
        print("Calculating energy for column", col)
        (physical_quantity, ac_type) = col
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilmtk/nilmtk
Commit Name: 63ef8bfa3b63090437bd27bf1e04db7ae1eae3cf
Time: 2014-11-27
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/totalenergy.py
Class Name:
Method Name: get_total_energy


Project Name: PyMVPA/PyMVPA
Commit Name: a685cd7c560bf9808ce472324e38a12d2f351ade
Time: 2008-02-05
Author: debian@onerussian.com
File Name: tests/test_splitsensana.py
Class Name: SplitSensitivityAnalyserTests
Method Name: testAnalyzer


Project Name: nilmtk/nilmtk
Commit Name: 7799db5af474118bf94c74b68e65d77f20b6e331
Time: 2015-08-17
Author: jack-list@xlk.org.uk
File Name: nilmtk/appliance.py
Class Name: Appliance
Method Name: matches