<h2>org.autoplot.jythonsupport.JythonOps</h2><p>Contains operations that are only available to Jython code, and is dependent
 on the jython libraries.</p>
<h2>JythonOps( )</h2>
<p></p>

<hr>
<a name="addToSearchPath"></a>
<h2>addToSearchPath</h2>
addToSearchPath( PyList syspath, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> path, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/monitor/ProgressMonitor.html'>ProgressMonitor</a> mon ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>download the jar file resource, unpack it, and add it to the search path.  Note
 such scripts will not work with Webstart releases!  The code is only
 loaded once per session, so Autoplot must be restarted if the library is updated.

 Here is an example use:
 <blockquote><pre><small>
import sys
addToSearchPath( sys.path, 'http://www-us.apache.org/dist//commons/math/binaries/commons-math3-3.6.1-bin.zip/commons-math3-3.6.1/commons-math3-3.6.1.jar', monitor )
from org.apache.commons.math3.distribution import BetaDistribution
beta= BetaDistribution(2,5)

xx= linspace(0,1.0,100)
yy= zeros(100)
for i in indgen(100):
    yy[i]= beta.density(xx[i].value())
#yy= map( xx, beta.density )
plot( xx, yy )
</small></pre></blockquote></p>

<h3>Parameters</h3>
syspath - the list of folders to search, should be sys.path.
<br>
path - the path to add, which should be a jar file, possibly contained within a zip on an http site.
<br>
mon - monitor for the download.

<h3>Returns:</h3>
the name of the folder or jar file added.
<h3>See Also:</h3>
<a href='https://sourceforge.net/p/autoplot/feature-requests/584/, which shows example use.'>https://sourceforge.net/p/autoplot/feature-requests/584/, which shows example use.</a> <br>
<a href='null'>findJavaPathRoots(org.das2.util.filesystem.FileSystem)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=addToSearchPath&unscoped_q=addToSearchPath">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#addToSearchPath">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l553">[view source]</a>
<br>
<br>
addToSearchPath( PyList syspath, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> path, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> docPath, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/monitor/ProgressMonitor.html'>ProgressMonitor</a> mon ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a><br>
<hr>
<a name="applyLambda"></a>
<h2>applyLambda</h2>
applyLambda( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds, PyFunction f ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a>

<p>Apply the Python function, typically a lambda function, to each
 element of the dataset.  For example: 
 <blockquote><pre><small>
 xx= dindgen( 6 ) 
 yy= applyLambda( xx, lambda x : x**2 )
 plot( xx, yy )
</small></pre></blockquote></p>

<h3>Parameters</h3>
ds - the dataset to which the function is applied
<br>
f - the function

<h3>Returns:</h3>
the dataset with the function applied
<br><br>
<a href="https://github.com/autoplot/dev/search?q=applyLambda&unscoped_q=applyLambda">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#applyLambda">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l79">[view source]</a>
<br>
<br>
applyLambda( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds1, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds2, PyFunction f ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a><br>
applyLambda( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds1, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds2, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds3, PyFunction f ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a><br>
<hr>
<a name="coerceToDs"></a>
<h2><del>coerceToDs</del></h2>
Deprecated: use dataset command.
<hr>
<a name="color"></a>
<h2>color</h2>
color( PyObject val ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/awt/Color.html'>java.awt.Color</a>

<p>get the color from the python object, for example:
 <ul>
 <li>Color.RED
 <li>16711680   (int for red)
 <li>16711680.  (float from QDataSet)
 <li>(255,0,0)
 <li>(1.0,0,0)
 </ul></p>

<h3>Parameters</h3>
val - the value

<h3>Returns:</h3>
java.awt.Color
<br><br>
<a href="https://github.com/autoplot/dev/search?q=color&unscoped_q=color">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#color">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l400">[view source]</a>
<br>
<br>
<hr>
<a name="currentLine"></a>
<h2>currentLine</h2>
currentLine(  ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>return the current line in the Jython script as &lt;filename&gt;:&lt;linenum&gt;
 or ??? if this cannot be done.  Note calls to this will collect a stack
 trace and will affect performance.</p>

<h3>Returns:</h3>
the current line or ???
<h3>See Also:</h3>
<a href='null'>QubeDataSetIterator#currentJythonLine()</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=currentLine&unscoped_q=currentLine">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#currentLine">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l702">[view source]</a>
<br>
<br>
<hr>
<a name="dataset"></a>
<h2>dataset</h2>
dataset( PyObject arg0 ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a>

<p>coerce a python array or list into a QDataSet.</p>

<h3>Parameters</h3>
arg0 - Python object or Datum

<h3>Returns:</h3>
QDataSet
<h3>See Also:</h3>
<a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/ops/Ops.html#dataset'>org.das2.qds.ops.Ops#dataset(java.lang.Object)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=dataset&unscoped_q=dataset">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#dataset">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l178">[view source]</a>
<br>
<br>
dataset( PyObject arg0, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/datum/Units.html'>Units</a> u ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a><br>
<hr>
<a name="datum"></a>
<h2>datum</h2>
datum( PyObject arg0 ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/datum/Datum.html'>Datum</a>

<p>coerce python objects to Datum</p>

<h3>Parameters</h3>
arg0 - Python object, one of rank 0 dataset, int, float, or String.

<h3>Returns:</h3>
Datum
<h3>See Also:</h3>
<a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/ops/Ops.html#datum'>org.das2.qds.ops.Ops#datum(java.lang.Object)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=datum&unscoped_q=datum">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#datum">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l287">[view source]</a>
<br>
<br>
<hr>
<a name="datumRange"></a>
<h2>datumRange</h2>
datumRange( PyObject arg0 ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/datum/DatumRange.html'>DatumRange</a>

<p>coerce python objects to DatumRange
 See http://jfaden.net:8080/hudson/job/autoplot-test029/
 This supports:<ul>
   <li>2-element rank 1 QDataSet
   <li>Strings like ("5 to 15 s" or "2014-01-01")
   <li>2-element arrays and lists
 </ul></p>

<h3>Parameters</h3>
arg0 - PyQDataSet, String, array or List.

<h3>Returns:</h3>
DatumRange
<br><br>
<a href="https://github.com/autoplot/dev/search?q=datumRange&unscoped_q=datumRange">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#datumRange">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l322">[view source]</a>
<br>
<br>
datumRange( PyObject arg0, PyObject arg1 ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/datum/DatumRange.html'>DatumRange</a><br>
datumRange( PyObject arg0, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/datum/Units.html'>Units</a> context ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/datum/DatumRange.html'>DatumRange</a><br>
<hr>
<a name="findJavaPathRoots"></a>
<h2>findJavaPathRoots</h2>
findJavaPathRoots( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/filesystem/FileSystem.html'>org.das2.util.filesystem.FileSystem</a> destDir ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a>

<p>search the folder for the names of packages.  This could trivially
 return "org", but instead navigate to find a more precise name, or names
 like "org.autoplot" and "org.das2".  Note this is a bit like a recursive
 find command, but note that some Java assumptions like classnames being
 capitalized and packages being lower case are encoded.</p>

<h3>Parameters</h3>
destDir - root to start the search.

<h3>Returns:</h3>
list of packages.
<h3>See Also:</h3>
<a href='null'>addToSearchPath(org.python.core.PyList, java.lang.String, org.das2.util.monitor.ProgressMonitor)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=findJavaPathRoots&unscoped_q=findJavaPathRoots">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#findJavaPathRoots">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l724">[view source]</a>
<br>
<br>
<hr>
<a name="formUri"></a>
<h2>formUri</h2>
formUri( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> vapScheme, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> resourceUri, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> args ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>convenience method for creating URIs.</p>

<h3>Parameters</h3>
vapScheme - null or the data source scheme, such as "vap+das2server" or "vap+cdaweb"
<br>
resourceUri - null or the resource uri, such as "http://www-pw.physics.uiowa.edu/das/das2Server"
<br>
args - null or a map/dictionary of arguments, including "arg_0" for a positional argument.

<h3>Returns:</h3>
the URI.  If vapScheme is null, then the URI will be implicit.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=formUri&unscoped_q=formUri">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#formUri">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l622">[view source]</a>
<br>
<br>
<hr>
<a name="invokeSometime"></a>
<h2>invokeSometime</h2>
invokeSometime( PyObject func ) &rarr; void

<p>run the function on a different thread</p>

<h3>Parameters</h3>
func - a jython callable.

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=invokeSometime&unscoped_q=invokeSometime">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#invokeSometime">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l675">[view source]</a>
<br>
<br>
invokeSometime( PyObject func, PyObject arg ) &rarr; void<br>
<hr>
<a name="putProperty"></a>
<h2>putProperty</h2>
putProperty( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> value ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/MutablePropertyDataSet.html'>org.das2.qds.MutablePropertyDataSet</a>

<p>converts types often seen in Jython codes to the correct type.  For
 example, ds= putProperty( ds, 'UNITS', 'seconds since 2012-01-01').
 Note USER_PROPERTIES can be a Python dictionary and it will be converted
 to a Java Map.</p>

<h3>Parameters</h3>
ds - the dataset
<br>
name - the name of the property, such as UNITS or USER_PROPERTIES
<br>
value - the value of the property

<h3>Returns:</h3>
the dataset, possibly converted to a mutable dataset.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=putProperty&unscoped_q=putProperty">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#putProperty">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l655">[view source]</a>
<br>
<br>
<hr>
<a name="validateParam"></a>
<h2>validateParam</h2>
validateParam( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> v, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a> constraint ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a>

<p>validate the parameter value against the constraint.  This will
 raise an exception when the constraint is not met, or returns a modified
 value conforming (with format).  See https://github.com/autoplot/dev/blob/master/demos/2025/20250108/getParamsValidation.jy</p>

<h3>Parameters</h3>
name - a String
<br>
v - an Object
<br>
constraint - a java.util.List

<h3>Returns:</h3>
java.lang.Object

<h3>See Also:</h3>
<a href='null'>validateParam(java.lang.String, java.lang.Object, java.util.Map)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=validateParam&unscoped_q=validateParam">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonOps.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonOps.html#validateParam">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonOps.java#l437">[view source]</a>
<br>
<br>
validateParam( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> v, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> constraint ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a><br>
validateParam( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> name, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> v, PyDictionary constraint ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a><br>