[GRASS-user] i.nightlights.intercalibration, Problem with running code

Nikos Alexandris nik at nikosalexandris.net
Tue Jun 19 21:33:14 PDT 2018


Dear Gabriel,

I realise, now, that if you try to run something with $() or backticks
in a input box, in the (G)UI, it won't work.

Try, please, directly the command line (or the Console in the GUI):

i.nightlights.intercalibration image=$(g.list rast pattern=F* sep=,) suffix=c model=elvidge2014


The following will _not_ work:

i.nightlights.intercalibration image= image=$(g.list rast pattern=F* sep=,) suffix=suffix=c model=elvidge2014


Nikos

ps- Kind request, please keep posting on the list.



* Nikos Alexandris <nik at nikosalexandris.net> [2018-06-20 04:07:27 +0200]:

>Dear Gabriel,
>
>try this:
>
>i.nightlights.intercalibration image=$(g.list rast pattern=F* sep=,)
>
>Details: the command `g.list` is not actually run, I think.
>
>Use the proper syntax, which is to enclose the command with a
>"$(g.list type=raster)".
>In my repository, and in the the manual there is still some demo
>command using backticks, like:  
>
>i.nightlights.intercalibration image=`g.list rast pattern=F* sep=,`
>
>which is the old style. Better the new style, i.e.:
>
>i.nightlights.intercalibration image=$(g.list rast pattern=F* sep=,)
>
>If you don't do this, the module will "think" that the option `image`
>is fed with only:
>
>image=g.list
>
>and the rest of the line will be treated as extra arguments.
>
>Nikos
>----- Original Message -----
>From:
> "Gabriel Cotlier" <gabiklm01 at gmail.com>
>
>To:
><grass-user at lists.osgeo.org>
>Cc:
>
>Sent:
>Tue, 19 Jun 2018 12:44:33 -0300
>Subject:
>[GRASS-user] i.nightlights.intercalibration, Problem with running code
>
>	Problem with running _i.nightlights.intercalibration
>_
>_ for the
>_Elvidge(2014) model-coefficients.
>
>	 Steps I have followed:
>
>	1.I have imported the following layers:
>
>	(Tue Jun 19 12:29:20
>2018)                                                     
>
>
>	g.list
>type=raster                                                             
>
>
>	F101992
>
>	F101993
>
>	F101994
>
>	F121994
>
>	F121995
>
>	F121996
>
>	F121997
>
>	F121998
>
>	F121999
>
>	F141997
>
>	F141998
>
>	F141999
>
>	F142000
>
>	F142001
>
>	F142002
>
>	F142003
>
>	F152000
>
>	F152001
>
>	F152002
>
>	F152003
>
>	F152004
>
>	F152005
>
>	F152006
>
>	F152007
>
>	F162004
>
>	F162005
>
>	F162006
>
>	F162007
>
>	F162008
>
>	F162009
>
>	F182010
>
>	F182011
>
>	F182012
>
>	(Tue Jun 19 12:29:21 2018) Command finished (0
>sec)                            
> 
>
>	 
>
>	2. I have run the code on the dialog box of
>_i.nightlights.intercalibration
>__ :
>
>_
>
>	_
>_
>
>	3. I got the following error message:
>
>	(Tue Jun 19 12:31:26 2018)                           
>                          
>
>	i.nightlights.intercalibration image=g.list type=raster         
>                                             
>       suffix=c model=elvidge2014
>
>	|i Inter-satellite calibration of DMSP-OLS Nighttime Stable Lights
>
>	WARNING: Operating on current region
>
>	|> Calibrating average visible Digital Number values
>
>	WARNING: No data base element files found
>
>	Traceback (most recent call last):
>
>	  File "C:UsersGabrielAppDataRoamingGRASS7addons/scrip
>
>	ts/i.nightlights.intercalibration.py [1]", line 525, in <module>
>
>	    sys.exit(main())
>
>	  File "C:UsersGabrielAppDataRoamingGRASS7addons/scrip
>
>	ts/i.nightlights.intercalibration.py [2]", line 340, in main
>
>	    model_parameters = retrieve_model_parameters(Model,
>
>	*args)
>
>	  File "C:UsersGabrielAppDataRoamingGRASS7addons/scrip
>
>	ts/i.nightlights.intercalibration.py [3]", line 242, in
>
>	retrieve_model_parameters
>
>	    model = model_class(*args, **kwargs)
>
>	  File "C:UsersGabrielAppDataRoamingGRASS7addonsetci
>
>	.nightlights.intercalibrationintercalibration_models.py",
>
>	line 155, in __init__
>
>	    CalibrationModel.__init__(self, author, satellite, year)
>
>	  File "C:UsersGabrielAppDataRoamingGRASS7addonsetci
>
>	.nightlights.intercalibrationintercalibration_models.py",
>
>	line 43, in __init__
>
>	    year=self.year)
>
>	  File "C:UsersGabrielAppDataRoamingGRASS7addonsetci
>
>	.nightlights.intercalibrationintercalibration_models.py",
>
>	line 63, in verify_year
>
>	    available_years = COEFFICIENTS[author][satellite].keys()
>
>	KeyError: 'g.l'
>
>	(Tue Jun 19 12:31:27 2018) Command finished (1 sec)           
>                 
>
>	Thanks a lot for your help
> and
>assistance
>.
>
>	Best regards,
>
>	Gabriel 
>
>
>
>Links:
>------
>[1] http://i.nightlights.intercalibration.py
>[2] http://i.nightlights.intercalibration.py
>[3] http://i.nightlights.intercalibration.py
>

>_______________________________________________
>grass-user mailing list
>grass-user at lists.osgeo.org
>https://lists.osgeo.org/mailman/listinfo/grass-user


-- 
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180620/afb51c57/attachment-0001.sig>


More information about the grass-user mailing list