{"_id":"583c619c1210131900a109e6","user":"55fae9d4825d5f19001fa379","__v":0,"parentDoc":null,"version":{"_id":"55faeacad0e22017005b8268","project":"55faeacad0e22017005b8265","__v":36,"createdAt":"2015-09-17T16:31:06.800Z","releaseDate":"2015-09-17T16:31:06.800Z","categories":["55faeacbd0e22017005b8269","55faf550764f50210095078e","55faf5b5626c341700fd9e96","55faf8a7825d5f19001fa386","560052f91503430d007cc88f","560054f73aa0520d00da0b1a","56005aaf6932a00d00ba7c62","56005c273aa0520d00da0b3f","5601ae7681a9670d006d164d","5601ae926811d00d00ceb487","5601aeb064866b1900f4768d","5601aee850ee460d0002224c","5601afa02499c119000faf19","5601afd381a9670d006d1652","561d4c78281aec0d00eb27b6","561d588d8ca8b90d00210219","563a5f934cc3621900ac278c","5665c5763889610d0008a29e","566710a36819320d000c2e93","56ddf6df8a5ae10e008e3926","56e1c96b2506700e00de6e83","56e1ccc4e416450e00b9e48c","56e1ccdfe63f910e00e59870","56e1cd10bc46be0e002af26a","56e1cd21e416450e00b9e48e","56e3139a51857d0e008e77be","573b4f62ef164e2900a2b881","57c9d1335fd8ca0e006308ed","57e2bd9d1e7b7220000d7fa5","57f2b992ac30911900c7c2b6","58adb5c275df0f1b001ed59b","58c81b5c6dc7140f003c3c46","595412446ed4d9001b3e7b37","59e76ce41938310028037295","5a009de510890d001c2aabfe","5a96f89c89442e002041144b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"v1","version_clean":"1.0.0","version":"1"},"category":{"_id":"573b4f62ef164e2900a2b881","__v":0,"project":"55faeacad0e22017005b8265","version":"55faeacad0e22017005b8268","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-05-17T17:05:38.443Z","from_sync":false,"order":9,"slug":"algorithm-guide","title":"Algorithms"},"project":"55faeacad0e22017005b8265","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-11-28T16:55:56.766Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":86,"body":"###Example Output\nThe output of this task is a string.\n\n### Quickstart\nThis is a workflow example for basic processing.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Quickstart Example running the task name.\\n\\n# Initialize the Environment.\\nfrom os.path import join, split\\nfrom gbdxtools import Interface\\ngbdx = Interface()\\n\\ntasks = []\\noutput_location = 'ENVI/GetSpectrumFromLibrary'\\n\\n\\n# Get a spectrum from a library\\nenvi_spectral_library = gbdx.Task(\\\"ENVI_GetSpectrumFromLibrary\\\")\\nenvi_spectral_library.inputs.input_spectral_library_filename = 'veg_2grn.sli'\\nenvi_spectral_library.inputs.spectrum_name = 'Dry Grass'\\ntasks += [envi_spectral_library]\\n\\nworkflow = gbdx.Workflow(tasks)\\nworkflow.savedata(\\n    envi_spectral_library.outputs.task_meta_data, location=output_location\\n)\\n\\nworkflow.execute()\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n### Inputs\nThe following table lists all ENVI_GetSpectrumFromLibrary inputs.\nMandatory (optional) settings are listed as Required = True (Required = False).\n\n  Name  |  Required  |  Default  |  Valid Values  |  Description  \n--------|:----------:|-----------|----------------|---------------\nfile_types|False|N/A|string|GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING`[*]`\ninput_spectral_library|False|N/A|[See ENVISPECTRALLIBRARY input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-envispectrallibrary)|Specify a spectral library from which to retrieve a particular spectrum. -- Value Type: ENVISPECTRALLIBRARY\ninput_spectral_library_filename|False|N/A|[See ENVISPECTRALLIBRARY input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-envispectrallibrary)|Provide the file name only of the ENVI built in spectral library file. -- Value Type: STRING\nspectrum_name|True|N/A|string|A string representing the material spectrum to retrieve. -- Value Type: STRING\n\n\n### Outputs\n\nThe following table lists all ENVI_GetSpectrumFromLibrary outputs.\nMandatory (optional) settings are listed as Required = True (Required = False).\n\n  Name  |  Required  |  Default  |  Valid Values  |  Description\n--------|:----------:|-----------|----------------|---------------\ntask_meta_data|False|N/A|directory|GBDX Option. Output location for task meta data such as execution log and output JSON\nwavelengths|True|N/A|string|A double array representing the wavelength values of the spectrum. -- Value Type: DOUBLEARRAY\nreflectance_scale_factor|True|N/A|string|Scale factor to be used in converting spectra to reflectance. -- Value Type: DOUBLE\ny_range|True|N/A|string|The range of the spectrum values. -- Value Type: DOUBLEARRAY\nspectrum|True|N/A|string|A double array representing the spectrum that matches the input spectrum name. -- Value Type: DOUBLEARRAY\nwavelength_units|True|N/A|string|A string representing the wavelength units of the spectrum. -- Value Type: STRING\n\n\n**Output structure**\n\nThe outputs will be written to the specified S3 Customer Account Location as a json file called `task_output.json`\n\n### Background\nFor additional background information on this task please refer to the [Harris Geospatial ENVI documentation](http://www.harrisgeospatial.com/docs/home.html) and \n[ENVI® Get Spectrum From Library](http://www.harrisgeospatial.com/docs/envigetspectrumfromlibrarytask.html). \n\n### Contact\nIf you have any questions or issues with this task, please contact [gbdx-support:::at:::digitalglobe.com](mailto:gbdx-support@digitalglobe.com).","excerpt":"This task retrieves the spectrum, wavelengths, and wavelength units for a specified material from a spectral library.\n    \n\t\n**GBDX Registered Name:** ENVI_GetSpectrumFromLibrary\n**Provider:** Harris\tGeospatial Solutions","slug":"envi-get-spectrum-from-library","type":"basic","title":"ENVI® Get Spectrum from Library"}

ENVI® Get Spectrum from Library

This task retrieves the spectrum, wavelengths, and wavelength units for a specified material from a spectral library. **GBDX Registered Name:** ENVI_GetSpectrumFromLibrary **Provider:** Harris Geospatial Solutions

###Example Output The output of this task is a string. ### Quickstart This is a workflow example for basic processing. [block:code] { "codes": [ { "code": "# Quickstart Example running the task name.\n\n# Initialize the Environment.\nfrom os.path import join, split\nfrom gbdxtools import Interface\ngbdx = Interface()\n\ntasks = []\noutput_location = 'ENVI/GetSpectrumFromLibrary'\n\n\n# Get a spectrum from a library\nenvi_spectral_library = gbdx.Task(\"ENVI_GetSpectrumFromLibrary\")\nenvi_spectral_library.inputs.input_spectral_library_filename = 'veg_2grn.sli'\nenvi_spectral_library.inputs.spectrum_name = 'Dry Grass'\ntasks += [envi_spectral_library]\n\nworkflow = gbdx.Workflow(tasks)\nworkflow.savedata(\n envi_spectral_library.outputs.task_meta_data, location=output_location\n)\n\nworkflow.execute()", "language": "python" } ] } [/block] ### Inputs The following table lists all ENVI_GetSpectrumFromLibrary inputs. Mandatory (optional) settings are listed as Required = True (Required = False). Name | Required | Default | Valid Values | Description --------|:----------:|-----------|----------------|--------------- file_types|False|N/A|string|GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING`[*]` input_spectral_library|False|N/A|[See ENVISPECTRALLIBRARY input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-envispectrallibrary)|Specify a spectral library from which to retrieve a particular spectrum. -- Value Type: ENVISPECTRALLIBRARY input_spectral_library_filename|False|N/A|[See ENVISPECTRALLIBRARY input type](https://gbdxdocs.digitalglobe.com/docs/envi-task-engine#section-envispectrallibrary)|Provide the file name only of the ENVI built in spectral library file. -- Value Type: STRING spectrum_name|True|N/A|string|A string representing the material spectrum to retrieve. -- Value Type: STRING ### Outputs The following table lists all ENVI_GetSpectrumFromLibrary outputs. Mandatory (optional) settings are listed as Required = True (Required = False). Name | Required | Default | Valid Values | Description --------|:----------:|-----------|----------------|--------------- task_meta_data|False|N/A|directory|GBDX Option. Output location for task meta data such as execution log and output JSON wavelengths|True|N/A|string|A double array representing the wavelength values of the spectrum. -- Value Type: DOUBLEARRAY reflectance_scale_factor|True|N/A|string|Scale factor to be used in converting spectra to reflectance. -- Value Type: DOUBLE y_range|True|N/A|string|The range of the spectrum values. -- Value Type: DOUBLEARRAY spectrum|True|N/A|string|A double array representing the spectrum that matches the input spectrum name. -- Value Type: DOUBLEARRAY wavelength_units|True|N/A|string|A string representing the wavelength units of the spectrum. -- Value Type: STRING **Output structure** The outputs will be written to the specified S3 Customer Account Location as a json file called `task_output.json` ### Background For additional background information on this task please refer to the [Harris Geospatial ENVI documentation](http://www.harrisgeospatial.com/docs/home.html) and [ENVI® Get Spectrum From Library](http://www.harrisgeospatial.com/docs/envigetspectrumfromlibrarytask.html). ### Contact If you have any questions or issues with this task, please contact [gbdx-support@digitalglobe.com](mailto:gbdx-support@digitalglobe.com).