Today I expanded on the direct to backend compiler directives:

#emit puts the given string directly on the source code as a LinearOp
#funattr adds function attributes to the current function
#global puts the string into the top of the generated file
#local puts the string into the top of the current function

With these in place you can do things like adding linear assembly (useful to insert optimization fences or other shenanigans), hookup instrumentation, and to configure your functions as you would with a C compiler (add always_inline, force loop unrolls, put a function into a given section, etc.). I think these form a base that could work for most or all backends I can think of, so they are not limited to the current C one.

#badlang #pldev

Last #DecemberAdventure day, but work won't stop after today, have a really long trip ahead still, and will celebrate new year's on the plane.

In the meantime, I used the new `#emit` directives to move all the stdlib specific code from the backend into std and added the option to compile without main to create standalone lib code that could run on any target with a crt. I also added raw string literals that extend until (and including) the newline.

I would like to fully get rid of the need for libc, but I'm not familiar enough with macos syscalls to start writing assembly for those, would probably do that on my linux machine after I'm back home.

#pldev #badlang

Some more #DecemberAdventure work from the bus:

- Improved codegen to avoid generating code for unused functions.
- Added the `#if` compiler directive for conditional compilation based on a given --flag.
- Added the `#error` compiler directive to ensure we have a way to signal a compilation error in some path (for example, unimplemented library functions for a given OS and such).
- Added the `#emit` compiler directive to be able to generate code directly on the backend verbatim. Now #badlang is a C macro assembler lol.

Here is everything together.

#pldev

European Geosciences Union: Assessing the Detection of Methane Plumes in Offshore Areas Using High-Resolution Imaging Spectrometers (21 Oct 2025) - https://amt.copernicus.org/articles/18/5545/2025/

This is a brilliant article using data from space-based spectrometers #EnMAP and #EMIT to detect and quantify #methane plumes offshore.

The oceans' low reflectivity makes detection harder, but using data when solar light is reflected to the sensor works as well as land.

#satellite #GHG #emissions #tracking

Assessing the Detection of Methane Plumes in Offshore Areas Using High-Resolution Imaging Spectrometers

Abstract. The offshore oil and gas industry is an important contributor to global anthropogenic methane emissions. Satellite-based, high-resolution imaging spectrometers are showing a great potential for the detection of methane emissions over land. However, the use of the same methods over offshore oil and gas extraction basins is challenged by the low reflectance of water in the near- and shortwave infrared spectral windows used for methane retrievals. This limitation can be partly alleviated by data acquisitions under the so-called sun glint configuration, which enhances the at-sensor radiance. In this work, we assess the performance of two space-based imaging spectrometers, EnMAP and EMIT, for the detection of offshore methane plumes applying the matched filter method. We use simulated plumes to generate parametric probability of detection (POD) models for a range of emission flux rates (Q), at-sensor radiances and wind speeds. The POD models were confronted with real plume detections for the two instruments. Our analysis shows that the spatial resolution of the instrument and the at-sensor radiance (which drives the retrieval precision) are the two factors with the greatest impact on plume POD. We also evaluate the dependence of the at-sensor radiance on the illumination-observation geometry and the surface roughness. Our POD models properly represent the different trade-offs between spatial resolution and retrieval precision in EnMAP and EMIT. As an example, for most combinations of Q and wind speed values at POD = 50 %, EMIT demonstrates better detection performance at Q>7 t h−1, whereas EnMAP performs better at Q<7 t h−1. This study demonstrates the ability of these two satellite instruments to detect high-emitting offshore point sources under a range of different conditions. By filtering data based on these conditions, methane emission detection and monitoring efforts can be optimized, reducing unnecessary searches and ultimately increasing the action taken on these emissions.

A long-standing pine forest in Hartheim am Rhein has suffered substantial and potentially irreversible damage due to prolonged periods of heat and drought since... https://news.osna.fm/?p=6681 | #news #co2 #emit #forests #reveals
Forests Now Emit CO2 Shock Study Reveals - Osna.FM

New research reveals how repeated heatwaves and droughts are devastating forests and impacting carbon storage..

Osna.FM
NASA Flights Map Critical Minerals from Skies Above Western US

Technology used to chart other worlds is revealing minerals in the American West that are critical to the country’s renewable energy future.

NASA Science

Now v1.3 is available and includes the EMIT reader.
In addition, you'll get the following:
- Sentinel-2 Geometry Up-scaling
- Sentinel-2 5m Super-Resolution
- Sentinel-2 Surface Reflectance Normalisation
- ASTER L1T Reader
- Coastal Map
- SpeX
- Asset Library

https://www.eomasters.org/eom-software/eomtbx-pro

#emit #EarthObservation #climate

EOMasters Toolbox Pro | EOMasters

EOMasters
HyperCoast: A Python Package for Visualizing and Analyzing Hyperspectral Data in Coastal Environments

Liu et al., (2024). HyperCoast: A Python Package for Visualizing and Analyzing Hyperspectral Data in Coastal Environments. Journal of Open Source Software, 9(100), 7025, https://doi.org/10.21105/joss.07025

Journal of Open Source Software
NASA Unveils First-Ever Global Maps of Earth’s Surface Minerals

EMIT delivers first-of-a-kind maps of minerals in Earth’s dust-source areas, enabling scientists to model the fine particles’ role in climate change and more. NASA’s EMIT mission has created the first comprehensive maps of the world’s mineral dust-source regions, providing precise locations of 10

SciTechDaily