vegard nygaard wrote:
> Hi.
> Can I put a "if" condition in a formula? It does not look like, but I hope I
> have overseen something.

No, it is not possible. I think, however, that the underlying JEP parser 
supports it we just don't have any code to translate it to SQL. The 
syntax to use for JEP is: if(condition, exprIfTrue, exprIfFalse)

The more complex must be done in two steps, since it is not possible to 
do both filtering and intensity transformation at the same time. In the 
first step you would have to do the filter and in the second step the 
flooring.

/Nicklas

Ps. I'll check if it is easy to add support for translating the if() 
function to SQL. If so, it might just appear in the 2.4 release.

> 
> What I want is something like this (approx. syntax):
> 
>       if( ch(1) <  100) )
>               1: 100
>       else
>               1: ch(1)
>               
> In English: Assign 100 to intensity one if it was below 100, if not keep as
> is. This is also called flooring.
>  
> 
> A more complex example:
> 
> if(ch(1) > 100 || ch(2) > 100 )//at least one channel above 100
> {
>       if(ch(1) > 100)
>               1:ch(1)
>       else
>               1:100
>               
>       if(ch(2) > 100)
>               2:ch(2)
>       else
>               2:100
> }
> else
>       filter out the spot.
>       
>       
> Best Regards
> Vegard Nygaard
> Software Engineer
> Department of Tumor Biology (Montebello)
> Rikshospitalet-Radiumhospitalet Medical Center 0310 Oslo
> Bioinformatics user support (NMC)
> Phone 0047 22935590
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> basedb-devel mailing list
> basedb-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/basedb-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to