Get the Max values and average of the different cycles in the single channel
Hello
I'm trying to get the Max values and average of the single channel that has different cycles it contains. I tried to use commands such as Chnclasspeak3 and chnpeakfind, but they were not useful for me. What I need is the Max values and average of the different cycles numbers saved in the data channel.
Exampld if the string contains 5 numbers of repetitive cycles, then we must find the maximum values and the average of these 5 cycles in the single channel. Attached reference data. This is the .raw file and I have the plugin for it to use in diadem 11.1.
Kind regards
X. Ignatius
Hello, Ignatius,.
Sorry, it took some time to provide a replacement based on the script for the function. Please take a look at the attached script. I changed the script to use my function if the tiara-version is less than 12. My script function is not as fast and more stable than the implementation of tiara, but for now, it does the job
Andreas
Tags: NI Software
Similar Questions
-
SQL, find the MAX value and placing it as a QVariant
I have a database that is loaded and defines the customerID as 0 which is ideal when the database is not be saved and restored, etc. The question I have is that I added the possibility to users to restore a backup in the app, and now I have to do a query to select MAX (customerID) so that there is no duplicate CustomerID when you add or save items. Here is the following code, I knew that I must settle, specifically the 0 highlighted in red. I need zero to be the new customerID max value:
int SettingsStorage::load(int& lastID, GroupDataModel *model) { // number of locations loaded. QSettings settings(m_author, m_appName); int loadedCount = 0; QVariant items; // Get the last customer id first. // ID's will be generated by incrementing this number // Note values coming from settings should be cast to the // required type. lastID = settings.value(m_lastCustomerIDKey, 0).toInt(); items = m_sda->execute("SELECT * from items ORDER BY datefield"); qDebug()<< "the ID" << items; // Load all the locations from the database. foreach( const QVariant& temp, items.value
() ) { Location *p; if (loadLocation(temp.value (), p)) { model->insert(p); loadedCount++; } } return loadedCount; } Ive tried the following, but it doesn't seem to do anything:
int SettingsStorage::load(int& lastID, GroupDataModel *model) { // number of locations loaded. QSettings settings(m_author, m_appName); int loadedCount = 0; QVariant items; // Get the last customer id first. // ID's will be generated by incrementing this number // Note values coming from settings should be cast to the // required type. QVariant endID = m_sda->execute("Select MAX(customerID) from items") lastID = settings.value(m_lastCustomerIDKey, endID).toInt(); items = m_sda->execute("SELECT * from items ORDER BY datefield"); qDebug()<< "the ID" << items; // Load all the locations from the database. foreach( const QVariant& temp, items.value
() ) { Location *p; if (loadLocation(temp.value (), p)) { model->insert(p); loadedCount++; } } return loadedCount; } Any help will be loved and marked solutions.
-Thanks in advance
I was wrong about executeAndWait(). Somehow, I decided that you use the SqlConnection object, but seems his SqlDataAccess. So disregard my previous post. Keep your execute method, but you must change your code to something like this:
QVariant endID = m_sda->execute("select max(customerID) as m from items"); QVariantList vlist = endID.value
(); QVariantMap vmap = vlist.first().toMap(); lastID = vmap["m"].toInt(&ok); So I changed your SQL query slightly and added "that m" so I will have something to refer later.
Then I cast QVariantList because it is where are the results.
Then because we know its going to be the only record, I took the 1st element in the list and converted to QVariantMap.
Last step is to get the maximum.
Should work this time
-
How to get the physical channel for USB card as ENET
Hello
For my application (VB .NET, using NIDAQmx 8.8), I need to access the 2 cards:
a USB-6008 and an ENET9163.
I would like to read the physical channels automatically with this feature NI-DAQmx
Physicalchannel1ComboBox.items.AddRange (DaqSystem.Local.GetPhysicalChannels (PhysicalChannelTypes.AI, PhysicalChannelAccess.External))
Unfortunately, he didn't get a single card at once.
When the USB card is connected, he read the physical channels of the USB card
When the USB adapter is not plugged in, it read the physical channels of the ENET card.
I hope someone can help me with this problem!
Thank you
RB
Hello RB.
To read from multiple channels, you can enter in the drop-down list box "Physical channel", the comma separated channels, custom channels or if you read physics, the string "DevX/Benjamin: Z", where X is the number of device, and X and are the first and the last channel you want to analyze (for example to read to ai0 to ai4 from your device 1 enter "Dev1 / ai0:4"). Among the names of your channels, I guess they are global channels created in MAX? You can always read channels multiple and different advice by separating the comma.
I hope this helps!
Kind regards
-
Hi all, I have the following query
I am rewriting the query so that I do not have the IS NOT NULL in the where clause. Depending on the size of the table, it causes the performance issue.SELECT prod,id,max(payment_date) payment_date FROM balance WHERE run = 25 AND pdate = '07-sep-2012' AND cd='CFACILITY' AND prod IS NOT NULL AND id IS NOT NULL AND payment_date IS NOT NULL GROUP BY prod,id
is it possible to rewrite the query so that I don't have a filter to help do IS DO NOT NULL, but at the same time producing a correct result in leaving aside the null lines.
for example, I am trying to eliminate:
AND prod IS NOT NULL
AND id IS NOT NULL
AND payment_date IS NOT NULL
at the same time I would like to use an analytic function or other technique to filter the data and get the lines which are not null in the select. don't know if I can filter for not null by using the analytic function
Maybe the analytical function will do. any idea?Hello
elmasduro wrote:
Hi all, I have the following querySELECT prod,id,max(payment_date) payment_date FROM balance WHERE run = 25 AND pdate = '07-sep-2012' AND cd='CFACILITY' AND prod IS NOT NULL AND id IS NOT NULL AND payment_date IS NOT NULL GROUP BY prod,id
I am rewriting the query so that I do not have the IS NOT NULL in the where clause. Depending on the size of the table, it causes the performance issue.
is it possible to rewrite the query so that I don't have a filter to help do IS DO NOT NULL, but at the same time producing a correct result in leaving aside the null lines.
for example, I am trying to eliminate:
AND prod IS NOT NULL
AND id IS NOT NULL
AND payment_date IS NOT NULL
at the same time I would like to use an analytic function or other technique to filter the data and get the lines which are not null in the select. don't know if I can filter for not null by using the analytic functionYou can put all these conditions in a HAVING clause:
WITH SELECT prod,id,max(payment_date) payment_date FROM balance WHERE run = 25 AND pdate = '07-sep-2012' AND cd = 'CFACILITY' GROUP BY prod,id HAVING prod IS NOT NULL AND id IS NOT NULL AND MAX (payment_date) IS NOT NULL
Normally, when there is a choice between the filter in the WHERE clause or the HAVING clause, the WHERE clause is faster, but maybe it's an exception.
If a group contains a few payment_dates NULL, which is not serious. MAX gets back the last payment_date not NULL and ignore all nulls. The only time where worry is if all the lines in the Group had payment_dates NULL, and the latter in the HAVING clause takes care of this.
What is the data type of p_date?
If it is a DATE, then don't compare it to a VACHAR2, such as "- 7-sep-2012". Use rather a literal DATE or TO_DATE.
For example:AND pdate = TO_DATE ( '07-sep-2012' , 'DD-mon-YYYY' )
Depending on your data and your needs, which may not work. If p_date isn't always midnight, then you should probably do something like this:
AND TRUNC (pdate) = TO_DATE ( '07-sep-2012' , 'DD-mon-YYYY' )
However, it is inefficient. It would not be faster to call TRUNC and do this way:
AND pdate >= TO_DATE ( '07-sep-2012' , 'DD-mon-YYYY' ) AND pdate < TO_DATE ( '07-sep-2012' , 'DD-mon-YYYY' ) + 1
Maybe the analytical function will do. any idea?
I don't think, but maybe I'm missing something. What was your thinking? Why suggest analytical fucntions?
-
get the specific channel pixels
Hello world!
Nobody knows
How to get to the Pixel values of each channel separately? I want to transform RBG to XYZ and I change channel od pixels. Pleasse help!A filter could simply use AdvanceState calls as usual.
And if you want to convert RGB to XYZ, you need all 3 channels at the same time, not separately.
-
How to get the weather channel videos to play in the Firefox update?
Perfectly updated Firefox and Shockwave flash. Weather Channel videos cause a black screen with no option, but all the other sites I've tried seem to work well.
Just for everyone's information...
The problem turns out to be with Weather.com and Ad Block Plus. Weather.com has started adding ads at the beginning of their videos, Ad Block Plus blocks them like it's supposed to... The only way around this is to disable Ad Block Plus on the Weather.com site. -
Get the max value with other areas
Hi all
I have a table as below
Value name
- - - - - - - - - - - - - - - -
A1 5
A3 10
A2 7
A2 9
A1 10
What I get is the max (Value) and with the consolidation of its name
Value name
- - - - - - - - -
A2 16
Thank you
Alex
Published by: user8606416 on June 1, 2011 10:17
Published by: user8606416 on June 1, 2011 10:26Depends on how you feel on one of the links of:
SELECT name, value FROM (SELECT name, SUM(value) FROM table GROUP BY name ORDER BY 2 DESC) WHERE rownum = 1 SELECT name, SUM(value) FROM table GROUP BY name HAVING SUM(value) >= ALL (SELECT SUM(value) FROM table GROUP BY name)
among many other methods. The first takes a single arbitrary registration in the case of a tie, and the second shows all the related records.
John
-
Hi DRM team:
I want to get a property value and precise when the hierarchy from. So, I thought that LocalNodeObjects method GetReferenceInHier (hierAbbrev), but the question is coming, I'm working on a global property, node. GetReferenceInHier (hierAbbrev) is not available. How can I get the value of the specified node hierarchy?
Thanks for any response.
Jim
Hi Jim.cyciopes
Try this-
var worm is node. Version;
var hier_ref = worm. HierByAbbrev ("name of your hierarchy");
var node_ref is hier_ref. NodeByAbbrev (node. ABBREV);
{if(node_ref!=null)}
var propval is node_ref. VarValeurProp ("YourPropertyName");
}
Return propval;
Thank you
Denzz
-
How to get the value of prompt financial reports and use it as a header
Hi gurus of the Oracle,.
I have Hyperion Financial Reporting 11.1.1.3. I've created a report.
I have the Products dimension on rows. And I also fast for the products.
Let's say there are 3 products, product A, B and C, each has its own point of level 0 (for example, A1, A2, B1, C1)
Currently in my situation, user will be prompted to select a list of products, and then the report will only show the level 0 of the product selected by the user. For example, the user select product has, then the report (or grid) displays A1 and A2 on the ranks. The user select product B, B1 will be displayed.
My question is, I want to create a dynamic header report, so how can I get this prompt value and use it as a report header? For example: sale of product when the user choose the product, or sales of product B when the user choose produced B.
Thanks a lot for your answer.Hello
Here's the way to do this:
1 insert a line (can be in line 1) in the report that produced as 'ask the user.
2 always mark this as hidden line
3. the user other lines like Level0 of product online 1
4 use MEMBERALIAS in the header to use the product as dimension & row as row1It could be useful!
Published by: user8628169 on June 22, 2011 10:53
-
problem when getting the value of the persistent object
Hello
I am trying to store the State of registration of the user in my App I have used persistent store. But I don't get the bak of the store database. I wrote the code below:
package com.saiservices.util; import java.util.Enumeration; import com.saiservices.ui.Logger; import net.rim.device.api.system.PersistentObject; import net.rim.device.api.system.PersistentStore; import net.rim.device.api.util.Persistable; public class SaiPersistentStore implements Persistable{ private SaiHashTable mElements = null; static SaiPersistentStore instance; private static final long KEY = xxxxxxxxxxxx; private PersistentObject persistentObject = null; /** * Gets the single instance of DataBase. * * @return single instance of DataBase */ public static SaiPersistentStore getInstance() { try { if (instance == null) { instance = new SaiPersistentStore(); } } catch (Exception e) { instance = null; } return instance; } private SaiPersistentStore() { Logger.out("PersistentStoreInfo", "inside constructor "); persistentObject = PersistentStore.getPersistentObject(KEY); synchronized (persistentObject) { if (persistentObject.getContents() == null) { persistentObject.setContents(new SaiHashTable()); persistentObject.commit(); } } mElements = (SaiHashTable)persistentObject.getContents(); if (mElements == null){ Logger.out("PersistentStoreInfo", "************"+(mElements == null)); mElements = new SaiHashTable(); } } public String getElement(String key) { Logger.out("PersistentStoreInfo", "getElement :"+key); Logger.out("PersistentStoreInfo", "getElement value :"+mElements.get(key)); return (String) mElements.get(key); } public void setElement(String key, String value) { Logger.out("PersistentStoreInfo", "setElement11111 :"+key + " "+value); mElements.put(key, value); persistentObject.setContents(mElements); Logger.out("PersistentStoreInfo", "setElement22222 :"+key+" "+value); persistentObject.commit(); } public Enumeration getAllKeys() { return mElements.keys(); } }
And here's the code for hash table:
package com.saiservices.util; import java.util.Hashtable; import net.rim.device.api.util.Persistable; public class SaiHashTable extends Hashtable implements Persistable{ public SaiHashTable(){ super(); } public SaiHashTable(int initialCepacity){ super(initialCepacity); } }
Now, I'll put the element as follows:
SaiPersistentStore.getInstance (.setElement("Registration","on"));
But when I try to get the item in a way theis, gettting null value:
SaiPersistentStore.getInstance () .getElement ("Register")
Where I am doing wrong here?
The fixed. Key hash table was different. Change it and it works...
-
How to get the numeric values with SCPI on an AG7034B
Hello
I use an Agilent 7034 osciloscope with 4 analog and 16 digital channels.
Read analog channels is no problem, but how do I get the digital channels (101010) waveform?
I see the digital signal on the screen of the instrument.
And: I want to do with SCPI commands and read/write Visa.
Thanks for all tips
Do you really mean the DSO7034B? If so, there are drivers available for LabVIEW and other programming environments. I suggest you only start with one of these. Check your manual to become familiar with the controls.
PS ad to the digital I/o Board is incorrect.
-
Is it possible to get the current height of a container?
You can get min, max heights and favorite, but none of these really reflect the actual height, currently used containers, especially when the container contains scalable text (which can get bigger or smaller fonts in display settings settings)
Is there a way to get a container currently used height?
Fix LayoutUpdateHandler to follow its current dimensions. http://developer.BlackBerry.com/Cascades/reference/bb__cascades__layoutupdatehandler.html
-
get the key of node of hierarchical Viewer in backing bean
Hi all
I am using jd 11.1.1.4
I have a hierarchical Viewer in my web page, which shows the employees in a company.
When I select a node and press the Add button, I want to add a node to the selected node level.
How can I get the details of the node selected in my grain of support
I used this code to get the key of the selected node
This.HV1.getSelectedRowKeys)
but this still gives null values
Please tell me how to do this
TXYou don't do that in the seelctionlistener
{} public void nodeSelected (SelectionEvent selectionEvent)
UIHierarchyViewer hv = selectionEvent.getSource ((UIHierarchyViewer));
RowKeySet addedSet = selectionEvent.getAddedSet ();
Iterator i = addedSet.iterator ();Model TreeModel (TreeModel) = hv.getValue ();
model.setRowKey (i.next ());Object, selectedNode = model.getRowData ();
Then mount the selected node for the specific type of model tree
in this example, it's a unique selection model, so you have to get the single rowkey in the selection testNote that the selectionEvent is org.apache.myfaces.trinidad.event.SelectionEvent
//...
} -
How do you get the Rhapsody channel on the "rocket"... I thought it came preloaded... but I guess that is was wrong.
What is the point of the chain of Rhapsody?
Im sure this has been asked before... but I want to know what it is and how I can get it on my rocket.
Thank you!
There are a variety of Rhapsodyschannel, in fact. Each channel is a different kind of music, essentially. Go to rhapsody.com to sign up (it's a service fee, not free) and then you can choose which channels you want to add to your rocket.
-
Getting the values MIN and MAX of the table data
I have the table and the following records.
I need to get the highest and lowest credit / debit amount for each trans_id.create table test_bank ( trans_id number , trans_date date , trans_amt number , debit_credit_indicator varchar2(3) ) Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (1, TO_DATE('01/17/2013 08:02:44', 'MM/DD/YYYY HH24:MI:SS'), 1099, 'cr'); Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (1, TO_DATE('01/18/2013 08:03:02', 'MM/DD/YYYY HH24:MI:SS'), 800, 'cr'); Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (1, TO_DATE('01/19/2013 08:03:18', 'MM/DD/YYYY HH24:MI:SS'), 500, 'db'); Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (1, TO_DATE('01/20/2013 08:03:36', 'MM/DD/YYYY HH24:MI:SS'), 200, 'cr'); Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (2, TO_DATE('01/22/2013 08:04:01', 'MM/DD/YYYY HH24:MI:SS'), 400, 'db'); Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (2, TO_DATE('01/23/2013 08:04:16', 'MM/DD/YYYY HH24:MI:SS'), 345, 'cr'); Insert into TEST_BANK (TRANS_ID, TRANS_DATE, TRANS_AMT, DEBIT_CREDIT_INDICATOR) Values (2, TO_DATE('01/24/2013 08:04:33', 'MM/DD/YYYY HH24:MI:SS'), 600, 'db'); COMMIT;
I tried the SQL query below. Could you please let me know if a better solution.
Thank youselect distinct * from ( select trans_id , case when debit_credit_indicator ='db' then max(trans_amt) over (partition by trans_id,debit_credit_indicator ) when debit_credit_indicator ='cr' then max(trans_amt) over (partition by trans_id,debit_credit_indicator ) else null end trans_amt , debit_credit_indicator from test_bank union select trans_id , case when debit_credit_indicator ='db' then min(trans_amt) over (partition by trans_id,debit_credit_indicator ) when debit_credit_indicator ='cr' then min(trans_amt) over (partition by trans_id,debit_credit_indicator ) else null end trans_amt , debit_credit_indicator from test_bank ) order by trans_id
Hello
to get the answer, we need to know what is your expected results (showing an example).
I don't know if this is appropriate for your needs:
SELECT trans_id, debit_credit_indicator, MAX (trans_amt) trans_amt, 'MAX' min_max FROM test_bank GROUP BY trans_id, debit_credit_indicator UNION ALL SELECT trans_id, debit_credit_indicator, MIN (trans_amt)trans_amt, 'MIN' min_max FROM test_bank GROUP BY trans_id, debit_credit_indicator ORDER BY trans_id, debit_credit_indicator, min_max DESC; TRANS_ID DEBIT_CREDIT_INDICATOR TRANS_AMT MIN_MAX ---------- ---------------------- ---------- ------- 1 cr 200 MIN 1 cr 1099 MAX 1 db 500 MIN 1 db 500 MAX 2 cr 345 MIN 2 cr 345 MAX 2 db 400 MIN 2 db 600 MAX
Kind regards.
Al
Maybe you are looking for
-
my laptop HP pavilion g6 missing hard drive partition
Hi all Help, please after problems with no sound failed to repir last resort was supposed to complete restoration. Now my dirve scores are bad, I have 3 instead of 4, they are as follows you will notice that my c drive is therefore more 600 GB in siz
-
You can set a default view in windows Explorer?
I wish that my files appear in the "list" view everytime I open windows Explorer. Currently it is defaulted to the last view used for each folder.
-
I am running XP and I can't use my keyboard and Device Manager is empty.
I am running XP and I can't use my keyboard and Device Manager is empty. I also have problems with my other computer also running XP and it will only start in safe mode. I tried to restore, and when it restarts it still will not start normally. Help,
-
Isn't Internet connection - software driver Code 31
can anyone help please... my acer Paolo of 64-bit windows vista is not to connect to the internet, Ive called ISP, they helped sort however they say its got a driver problem. I went into settings and it contains the code of the 31 driver software and
-
Inspiron 3542 - without battery
I bought this laptop in Austrlia in July 2014. Have been using almost every day since then. The battery is dead. The light at the edge of the RHS, which is usually blue, is flashing, blue and red. Power up - a message appears - "your battery is a per