|
73 | 73 | "import warnings\n", |
74 | 74 | "import time\n", |
75 | 75 | "import json\n", |
| 76 | + "import re\n", |
76 | 77 | "from IPython import display\n", |
77 | 78 | "# atl03 plotting imports\n", |
78 | 79 | "import numpy as np\n", |
|
334 | 335 | " with show_code06_output:\n", |
335 | 336 | " display.clear_output()\n", |
336 | 337 | " print(f'icesat2.init(\"{url_textbox.value}\")')\n", |
337 | | - " print('parms = ', json.dumps(atl06_parms, indent=4), sep='')\n", |
| 338 | + " # validate boolean entries to be in title case\n", |
| 339 | + " atl06_json = json.dumps(atl06_parms, indent=4)\n", |
| 340 | + " atl06_json = re.sub(r'\\b(true|false)', lambda m: m.group(1).title(), atl06_json)\n", |
| 341 | + " print('parms = ', atl06_json, sep='')\n", |
338 | 342 | " print('gdf = icesat2.atl06p(parms, asset=\"icesat2\")')\n", |
339 | 343 | " \n", |
340 | 344 | "# link buttons\n", |
|
570 | 574 | " with show_code03_output:\n", |
571 | 575 | " display.clear_output()\n", |
572 | 576 | " print(f'icesat2.init(\"{url_textbox.value}\")')\n", |
573 | | - " print('parms = ', json.dumps(atl03_parms, indent=4), sep='')\n", |
| 577 | + " # validate boolean entries to be in title case\n", |
| 578 | + " atl03_json = json.dumps(atl03_parms, indent=4)\n", |
| 579 | + " atl03_json = re.sub(r'\\b(true|false)', lambda m: m.group(1).title(), atl03_json)\n", |
| 580 | + " print('parms = ', atl03_json, sep='')\n", |
574 | 581 | " print('gdf = icesat2.atl03sp(parms, asset=\"icesat2\")')\n", |
575 | 582 | " \n", |
576 | 583 | "# install click handler callback\n", |
|
651 | 658 | "name": "python", |
652 | 659 | "nbconvert_exporter": "python", |
653 | 660 | "pygments_lexer": "ipython3", |
654 | | - "version": "3.11.3" |
| 661 | + "version": "3.10.6" |
655 | 662 | }, |
656 | 663 | "toc-showtags": false |
657 | 664 | }, |
|
0 commit comments