dsfb-rf 1.0.1

DSFB-RF Structural Semiotics Engine for RF Signal Monitoring - A Deterministic, Non-Intrusive Observer Layer for Typed Structural Interpretation of IQ Residual Streams in Electronic Warfare, Spectrum Monitoring, and Cognitive Radio
Documentation
+
���i$���Rt^RIHt^RIt^RIt^RIt^RIt^RIt^RIH	t	^RI
tRtRt
Rt]]
3RRlltR	R
lt]3RRlltR#)
u�
DeepSense-6G slice generator.

Primary path: ``extract_scenario23_slice`` reads a user-downloaded
Scenario-23 UAV-mmWave zip (``scenario23_dev_w_resources.zip`` from
deepsense6g.net) and emits a ≤ 2 MB HDF5 head slice with
``[time, beam]`` mmWave power + UAV telemetry.

Fallback path: ``generate`` — schema-preserving multimodal proxy (mmWave IQ
block + GPS trace + camera hash surrogate) emitted only when the local zip
is absent, loudly stamped ``[SYNTHETIC PROXY]``.
)�annotationsN)�Pathii�i�c�0�V^8�dQhRRRRRRRRRRR	R
/#)��out_binr�out_meta�rngznp.random.Generator�n_mmwave�int�n_gps�return�None�)�formats"�</home/one/dsfb/crates/dsfb-rf/scripts/gen_proxy_deepsense.py�__annotate__rsL��+M�+M�
�+M��+M�
�+M��	+M�
�+M�
�
+M�c��\V4p\V4p\P!V4pVPV4RVPV4,,P	\P
4\P!R4,pRR\P!^\P,V,R,VP^^\P,4,4,,pWgP	\P4,p\P!V^,\PR7pVPP	\P4VR&VPP	\P4VR&\P!VP!4R,4P#4p	RR(r�V
\P!V4R	,VPV4P%4R
,,,pV\P!V4R	,VPV4P%4R
,,,p
\'V4Uu.uF"q�R,R
R
W�,R
R
W�,R
2NK$	ppVP!4R,RP)V4P+R4,pVP-V4RRRRRRR\.P0!R\.P2!44RRRRRV/RRVR R!/R"V	/R#R$/pVP5\6P8!V^R%7R,RR&7R'#uupi))y�?g@g�?g-C��6?��dtype:�Nr:�Nr:NiNg���ׁ+E@g�����ư>gH�����z>g�������?z.1f�,z.6fs
---GPS---
�
�utf-8�dsfb_rf:provenancezsynthetic-proxyzdsfb_rf:proxy_forz.DeepSense-6G scenario sample (deepsense6g.net)zdsfb_rf:source_modelzcRayleigh mmWave fading + slow amplitude modulation + linear GPS walk + sha256 camera hash surrogatezdsfb_rf:generated_at�%Y-%m-%dT%H:%M:%SZ�
modalities�	mmwave_iq�datatype�cf32�	n_samples�	gps_tracerzCSV: t_s,lat_deg,lon_deg�camera_hash�noticezl[SYNTHETIC PROXY] No real imagery fabricated; camera modality represented by a deterministic hash surrogate.��indent��encodingNgo�ŏ�Q�)r
�np�arange�standard_normal�astype�	complex64�sqrt�cos�pi�uniform�float32�empty�real�imag�hashlib�sha256�tobytes�	hexdigest�cumsum�range�join�encode�write_bytes�time�strftime�gmtime�
write_text�json�dumps)rrrr	r�t�h�slowr �cam_hash�lat0�lon0�lat�lon�i�gps_rows�payload�metas&&&&&             r�generaterQs����8�}�H���J�E�	�	�	�(��A�	�	�	�X�	&��c�.A�.A�(�.K�)K�	K�S�S�TV�T`�T`�a�df�dk�dk�lo�dp�p�A���r�v�v�a�"�%�%�i�!�m�d�2�S�[�[��A����I�5N�N�O�O�O�D�	�K�K��
�
�#�#�A�
�8�8�H�q�L��
�
�3�D������r�z�z�*�D��J������r�z�z�*�D��J��~�~�d�l�l�n�U�3�4�>�>�@�H��(�$�
�"�)�)�E�"�T�)�C�,?�,?��,F�,M�,M�,O�RV�,V�V�
W�C�
�"�)�)�E�"�T�)�C�,?�,?��,F�,M�,M�,O�RV�,V�V�
W�C�BG��,�O�,�Q�S�5��+�Q�s�v�c�l�!�C�F�3�<�8�,�H�O��l�l�n�/�/�$�)�)�H�2E�2L�2L�W�2U�U�G����� �	�/��M��!F���
�
�.B�D�K�K�M� R���*�f�k�8�D��+�u�h�8R�S��8�
�
	�A��D�
����
�
�4��2�T�9�G��L��#Ps�(Nc�$�V^8�dQhRRRRRR/#)r�zfzzipfile.ZipFile�path�strr�floatr)rs"rrrMs!���������rc���\VPV4PR4P4P	4^,4# \
\3d\R4u#i;i)�ascii�nan)rV�read�decode�strip�
splitlines�KeyError�
ValueError)rSrTs&&r�_read_scalar_txtr`MsZ����R�W�W�T�]�)�)�'�2�8�8�:�E�E�G��J�K�K���j�!���U�|���s�AA�A-�,A-c
�,�V^8�dQhRRRRRRRRRR/#)	r�zip_pathr�out_h5r�n_headr
r�dictr)rs"rrrTsA��@�@��@��@��@�
�	@�

�@rc��
�^RIp^RIp\	T4pTP4'g\
RT24h\	T4p\	T4p\P!TR4;_uu_4pTPR4pTP\P!TPR444p	.p
\T	4Fwr�Y�8�dMT
PT4K 	T
'g\R4h\!T
4p
\"P$!T
^@3\"P&R7p\"P$!T
\"P(R7p\"P$!T
\"P&R7p\"P$!T
\"P&R7p\"P$!T
\"P&R7p\"P$!T
\"P&R7p\"P$!T
\"P&R7p\"P$!T
\"P&R7p\T
4EF�wppR	TR
,P+R4,pTPT4PR4P-4P/4p\"P0!TUu.uFp\3T4NK	up\"P&R7pTP4^@8wd\7R
TP4RT24hTTT&\;TR,4TT&\=TR	TR,P+R4,4TT&\=TR	TR,P+R4,4TT&\=TR	TR,P+R4,4TT&\=TR	TR,P+R4,4TT&\=TR	TR,P+R4,4TT&\=TR	TR,P+R4,4TT&EK�	RRR4TP?TR4;_uu_4pTPARXR^R7TPARXR^R7TPARXR^R7TPARXR^R7TPARXR^R7TPAR XR^R7TPAR!XR^R7TPAR"XR^R7R#TPBR$&R%TPBR&&TPDTPBR'&\FPH!TPK4R(,4PM4R),TPBR*&X
TPBR+&\NPP!R,\NPR!44TPBR-&R.TPBR/&RRR4R$R#R&R0R'TPDR+X
R/RR1RR2RR3RR4RR5R R6R!R7R"R8/R-\NPP!R,\NPR!44R9R:/pTPU\VPX!T^R;7R<,RR=7T# \dp\R4ThRp?ii;iuupi \8\63dp\RTRT24ThRp?ii;i \8\63d
R>TT&EL�i;i +'giEL�;i +'giEL;i)?u�
Extract a ≤ 2 MB head slice from a user-downloaded Scenario 23 zip.

Schema of the emitted HDF5 file:
    /mmwave_power[time, beam]  float32   shape = (n_head, 64)
    /best_beam_index[time]     int16     shape = (n_head,)
    /altitude[time]            float32   shape = (n_head,)
    /speed[time]               float32   shape = (n_head,)
    /pitch[time]               float32   shape = (n_head,)
    /roll[time]                float32   shape = (n_head,)
    /distance[time]            float32   shape = (n_head,)
    /height[time]              float32   shape = (n_head,)

Provenance stamped as HDF5 root attributes so a reviewer can inspect via
``h5dump -A``. Returns a small manifest dict for SLICE_MANIFEST.json.
Nzch5py is required for DeepSense-6G Scenario 23 real slice extraction; install via `pip install h5py`zScenario 23 zip not found: �rzscenario23_dev/scenario23.csvrzscenario23.csv is emptyrzscenario23_dev/�unit1_pwr_60ghzz./rXzexpected 64 beams, got z in zmmWave read failed at row z: �unit1_beam_index�unit2_altitude�unit2_speed�unit2_pitch�
unit2_roll�unit2_distance�unit2_height�w�mmwave_power�gzip)�data�compression�compression_opts�best_beam_index�altitude�speed�pitch�roll�distance�heightzreal-local-ziprujDeepSense-6G Scenario 23 UAV mmWave (deepsense6g.net/scenarios/scenario-23) — user-downloaded head slicezdsfb_rf:sourcezdsfb_rf:parent_zip:N�@Nz	-first64Bzdsfb_rf:parent_zip_sha256zdsfb_rf:head_n_samplesrzdsfb_rf:extracted_atz�mmwave_power[time,beam] float32 (N,64); best_beam_index int16 (N,); telemetry (altitude, speed, pitch, roll, distance, height) float32 (N,)zdsfb_rf:schemaz5DeepSense-6G Scenario 23 UAV mmWave (deepsense6g.net)u3float32 (N,64) — 60 GHz beamformed power per beamu+int16 (N,) — ground-truth best-beam labelu&float32 (N,) — UAV altitude (meters)u float32 (N,) — UAV speed (m/s)u float32 (N,) — UAV pitch (rad)ufloat32 (N,) — UAV roll (rad)u$float32 (N,) — UAV-BS distance (m)u#float32 (N,) — UAV height AGL (m)r$z|Real DeepSense-6G Scenario 23 (UAV mmWave) head slice; not a benchmark reproduction. Contextual residual-trace exhibit only.r%rr'�����)-�csv�h5py�ImportError�RuntimeErrorr�is_file�FileNotFoundError�zipfile�ZipFilerZ�
DictReader�io�StringIOr[�	enumerate�append�lenr)�zerosr2�int16�lstripr\r]�arrayrV�sizer_r^r
r`�File�create_dataset�attrs�namer6r7�
read_bytesr9r?r@rArBrCrD)rbrcrrdrr��erS�	csv_bytes�reader�rowsrM�row�n�mmwave�	best_beamrwrxryrzr{r|�k�mm_path�mm�x�vec�err�frPs&&&&                          r�extract_scenario23_slicer�Ts��,����H�~�H�������"=�h�Z� H�I�I�
�&�\�F��H�~�H�	����3�	'�	'�2��G�G�;�<�	�������I�,<�,<�W�,E� F�G������'�F�A��{���K�K���(���8�9�9���I�����1�b�'����4���H�H�Q�b�h�h�/�	��8�8�A�R�Z�Z�0������"�*�*�-������"�*�*�-���x�x�����,���8�8�A�R�Z�Z�0�����!�2�:�:�.����o�F�A�s�'�#�.?�*@�*G�*G��*M�M�G�
U��W�W�W�%�,�,�W�5�;�;�=�H�H�J���h�h�"�5�"�Q��a��"�5�R�Z�Z�H���8�8�r�>�$�'>�s�x�x�j��W�I�%V�W�W���q�	�
"�"�3�'9�#:�;�	�!��+�2�/@�3�GW�CX�C_�C_�`d�Ce�/e�f�H�Q�K�'��,=��M�@R�@Y�@Y�Z^�@_�,_�`�E�!�H�'��,=��M�@R�@Y�@Y�Z^�@_�,_�`�E�!�H�&�r�+<�s�<�?P�?W�?W�X\�?]�+]�^�D��G�*�2�/@�3�GW�CX�C_�C_�`d�Ce�/e�f�H�Q�K�(��->��^�AT�A[�A[�\`�Aa�-a�b�F�1�I�+&�+
(�X
���6�3�	�	�1�	����f�&�[\��]�	���*���ab��c�	����(��YZ��[�	����u�&�ST��U�	����u�&�ST��U�	����d��QR��S�	����(��YZ��[�	�����F�UV��W�(8����$�%�
U�	
��� �!�)1�
�
����$�%�/6�~�~�h�>Q�>Q�>S�TW�>X�/Y�/c�/c�/e�hs�/s����+�,�,-����(�)�*.�-�-�8L�d�k�k�m�*\����&�'�
V�	
��� �!�%
 �0	�.��Q��h�m�m� �!���Q��L��@��7��7��5��>��;�	
�	��
�
�.B�D�K�K�M� R��
T�#�D�*
����
�
�4��2�T�9�G��L��K��M���
-�
��	����L 6���j�)�
U�"�%?��s�"�S�E�#J�K�QT�T��
U��
�j�)�
"�!�	�!��
"��E
(�	'�	'��X
 �	�	�s��Y$�.A<[�+E9[�%AZ�5Z�	AZ�Z3�'D
[�F[$�$Z�/Y;�;Z�Z�Z0	�Z+	�+Z0	�0[�3[
	�	[�[
	�
[�[!	�$[5	)�__doc__�
__future__rr6r�rCr?r��pathlibr�numpyr)�N_MMWAVE_SAMPLES�
N_GPS_SAMPLES�SCENARIO23_HEAD_NrQr`r�rrr�<module>r�sZ���#��	���������
���%��+M�\�$�	@�@r