lecory 波形二进制文件头(.trc)定义

1.文件头,从0字节开始

       byte[] lecroy_trc_header = new byte[]{
        0x23,0x39,0x30,0x30,0x32,0x30,0x30,0x30,0x31,0x34,0x34,0x57,0x41,0x56,0x45,0x44,
        0x45,0x53,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,
        0x59,0x5F,0x32,0x5F,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x5A,
        0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB6,0x83,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,0x59,0x57,0x53,0x34,
        0x32,0x34,0x00,0x00,0x00,0x00,0x00,0x4B,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0x41,0x0F,0x00,0xDB,
        0x41,0x0F,0x00,0x40,0x42,0x0F,0x00,0x00,0x00,0x00,0x00,0xDA,0x41,0x0F,0x00,0x00,
        0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x00,0x80,0x39,0x00,0x00,0x00,0xBF,0x00,
        0x00,0xFE,0x46,0x00,0x00,0x00,0xC7,0x0B,0x00,0x01,0x00,0xBD,0x37,0x06,0x35,0x1E,
        0xF4,0xC8,0xB6,0x68,0x78,0xD1,0xBF,0x46,0xB6,0xF3,0xFD,0xD4,0x78,0xD1,0xBF,0x56,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
        0xEB,0xAF,0x2C,0x99,0xBC,0x0B,0xD8,0x31,0x27,0x39,0x40,0x02,0x0F,0x1A,0x04,0xE7,
        0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x20,
        0x00,0x02,0x00,0x00,0x00,0x80,0x3F,0x13,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,
        0x00,0x00,0xBF,0x00,0x00 };

2.关键字段:

        List<trc_field_define> trc_header_fields = new List<trc_field_define>{
            new trc_field_define("文件总长字段", 0, 11, "string", "%文件头,主要用于指示文件大小,数值为9e10+文件字节长度(不包括此文件头的11个字节)", "#9020000350"),
            new trc_field_define("大小端", 11+34, 2, "u16", "数据大小端", "=1小端"),
            new trc_field_define("文件头长", 11+36, 4, "u32", "%文件头WAVEDSEC块的长度,4B, long, 36-39", "可认为定长:346,+11字节头部=0x165 == sizeof(lecroy_trc_header)"),
            new trc_field_define("波形数据总长", 11+60, 4, "u32", "WAVE_ARRAY_1,%4B,long,60-63,数据列1长度", "20000004,一般是采样点数总长=时间+数据"),
            new trc_field_define("时间数据总长", 11+112, 4, "u32", "", "10000002, 为波形数据总长/2"),
            new trc_field_define("采样数据总长", 11+116, 4, "u32", "", "10000002,为波形数据总长/2"),
            new trc_field_define("PNTS_PER_SCREEN", 11+128, 4, "u32", "区间数", "为波形数据总长/2-2"),
            new trc_field_define("VERTICAL_GAIN", 11+156, 4, "float", "最终的数值=采样值*Gain+offset", "1.373120030621067e-04"),
            new trc_field_define("VERTICAL_OFFSET", 11+160, 4, "float", "垂直零点", "0"),
            new trc_field_define("MAX_VALUE", 11+164, 4, "u32", "最大值", "28875"),
            new trc_field_define("MIN_VALUE", 11+168, 4, "u32", "最小值", "-29131"),
            new trc_field_define("HORIZ_INTERVAL", 11+176, 4, "float", "采样率", "1e-10"),
            new trc_field_define("HORIZ_OFFSET", 11+180, 8, "double", "水平偏移", "-5e-4"),
            new trc_field_define("PIXEL_OFFSET", 11+188, 8, "u32", "屏幕当前偏移?", "-5e-4"),
            new trc_field_define("HORIZ_UNCERTAINTY", 11+292, 4, "float", "区间数", "1e-12,采样率的1%"),
            new trc_field_define("TIMEBASE", 11+324, 2, "u16", "水平栅格时长?这是enum", "24"),
            new trc_field_define("FIXED_VERT_GAIN", 11+332, 2, "u16", "垂直固定增益?enum", "18")
        };

       文件结构概要

        /*
         * %Header
           %用户文本块
                TEXT % 视上面定义的长度而定
           % TRIGTIME
                TRIGGER_T % 8B f 原名结尾是TIME,但与前面定义重复,故改为T
                TRIGGER_OFFSET % 8B f
           % RISTIME
                RIS_OFFSET % 8B f
           % DATA_ARRAY_1
                DATA_ARRAY_1
           % DATA_ARRAT_2
                DATA_ARRAY_2
           % SIMPLE
                SIMPLE int16模式
           % DUAL
        */

4.力科的离线波形文件分析工具MAUI Studio.

 

附件1:参考资料:

  •  CSDN博主「Surrea1」的原创文章,遵循CC 4.0 BY - SA版权协议,转载请注意附上原文出处链接及本声明。

附件2:csv=>.trc例程

/*
 *  lecroy_trc.cs
 *  
 *  A csv to lecory .trc bin file format helper modules.
 *  
 *  thanks to Lecroy, for its powerful offline wavefrom analyse tools.
 *  and Surrea1@CSDN for provide the .trc file format.
 *  
 *  ----
 *  V1.0.20230530 by twicave
 *          created. the first verison, coding in vs2022(c#)
 *  
 */

using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Diagnostics.SymbolStore;
using System.Linq;
using System.Reflection.PortableExecutable;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using static System.Net.Mime.MediaTypeNames;
using System.ComponentModel;

namespace SampleData_CSV2LecoryTrc
{

    internal class lecroy_trc
    {
        static byte[] lecroy_trc_header = new byte[]{
        0x23,0x39,0x30,0x30,0x32,0x30,0x30,0x30,0x31,0x34,0x34,0x57,0x41,0x56,0x45,0x44,
        0x45,0x53,0x43,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,
        0x59,0x5F,0x32,0x5F,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x5A,
        0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB6,0x83,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4C,0x45,0x43,0x52,0x4F,0x59,0x57,0x53,0x34,
        0x32,0x34,0x00,0x00,0x00,0x00,0x00,0x4B,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0x41,0x0F,0x00,0xDB,
        0x41,0x0F,0x00,0x40,0x42,0x0F,0x00,0x00,0x00,0x00,0x00,0xDA,0x41,0x0F,0x00,0x00,
        0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0D,0x00,0x80,0x39,0x00,0x00,0x00,0xBF,0x00,
        0x00,0xFE,0x46,0x00,0x00,0x00,0xC7,0x0B,0x00,0x01,0x00,0xBD,0x37,0x06,0x35,0x1E,
        0xF4,0xC8,0xB6,0x68,0x78,0xD1,0xBF,0x46,0xB6,0xF3,0xFD,0xD4,0x78,0xD1,0xBF,0x56,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x53,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
        0xEB,0xAF,0x2C,0x99,0xBC,0x0B,0xD8,0x31,0x27,0x39,0x40,0x02,0x0F,0x1A,0x04,0xE7,
        0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x20,
        0x00,0x02,0x00,0x00,0x00,0x80,0x3F,0x13,0x00,0x00,0x00,0x00,0x00,0x80,0x3F,0x00,
        0x00,0x00,0xBF,0x00,0x00 };

        public class trc_field_define
        {
            public string standardName;
            public string field_name;
            public int offetIdxbase0;
            public int len;
            public string type;
            public string memo;
            public string example;
            public trc_field_define(string standardName, string field_name, int offsetIdxbase0, int len, string type, string memo, string example) 
            { 
                this.standardName = standardName;
                this.field_name = field_name;
                this.offetIdxbase0 = offsetIdxbase0;
                this.len = len;
                this.type = type;
                this.memo = memo;
                this.example = example;
            }
        };

        static List<trc_field_define> trc_header_fields = new List<trc_field_define>{
            new trc_field_define("totalLength","文件总长字段", 0, 11, "string", "%文件头,主要用于指示文件大小,数值为9e10+文件字节长度(不包括此文件头的11个字节)", "#9020000350"),
            new trc_field_define("no_use","大小端", 11+34, 2, "u16", "数据大小端", "=1小端"),
            new trc_field_define("no_use", "文件头长", 11+36, 4, "u32", "%文件头WAVEDSEC块的长度,4B, long, 36-39", "可认为定长:346,+11字节头部=0x165 == sizeof(lecroy_trc_header)"),
            new trc_field_define("allDataLength","波形数据总长", 11+60, 4, "u32", "WAVE_ARRAY_1,%4B,long,60-63,数据列1长度", "20000004,一般是采样点数总长=时间+数据"),
            new trc_field_define("timeDataLength","时间数据总长", 11+112, 4, "u32", "", "10000002, 为波形数据总长/2"),
            new trc_field_define("sampleDataLength","采样数据总长", 11+116, 4, "u32", "", "10000002,为波形数据总长/2"),
            new trc_field_define("pntsPerScreen","PNTS_PER_SCREEN", 11+120, 4, "u32", "区间数", "为波形数据总长/2-2"),
            new trc_field_define("lastvalidPnts","LAST_VALID_PNT", 11+128, 4, "u32", "区间最后一个数据点", "为波形数据总长/2-1"),
            new trc_field_define("vertical_gain","VERTICAL_GAIN", 11+156, 4, "float", "最终的数值=采样值*Gain+offset", "1.373120030621067e-04"),
            new trc_field_define("vertical_offset","VERTICAL_OFFSET", 11+160, 4, "float", "垂直零点", "0"),
            new trc_field_define("max","MAX_VALUE", 11+164, 4, "u32", "最大值", "28875"),
            new trc_field_define("min","MIN_VALUE", 11+168, 4, "u32", "最小值", "-29131"),
            new trc_field_define("horizInterval","HORIZ_INTERVAL", 11+176, 4, "float", "采样率", "1e-10"),
            new trc_field_define("horizOffset","HORIZ_OFFSET", 11+180, 8, "double", "水平偏移", "-5e-4"),
            new trc_field_define("pixelOffset","PIXEL_OFFSET", 11+188, 8, "u32", "屏幕当前偏移?", "-5e-4"),
            new trc_field_define("horiz_uncertainty","HORIZ_UNCERTAINTY", 11+292, 4, "float", "区间数", "1e-12,采样率的1%"),
            new trc_field_define("timeBase","TIMEBASE", 11+324, 2, "u16", "水平栅格时长?这是enum", "24"),
            new trc_field_define("fixed_Vert_Gain","FIXED_VERT_GAIN", 11+332, 2, "u16", "垂直固定增益?enum", "18")
        };

        public struct trcHeaderFields
        {
            public string totalLength; //0x9e10+0x0b+lenOfAd*2 "#...."
            public int allDataLength; //2*lenOfAd(bytes)
            public int timeDataLength; //lenOfAd;
            public int sampleDataLength; //lenOfAd;
            public int pntsPerScreen; //lenfOfAd-2;
            public int lastvalidPnts; //lenOfAd-1
            public float vertical_gain; //垂直增益
            public UInt32 vertical_offset; //垂直偏移
            public UInt32 max;
            public UInt32 min;
            public float horizInterval; //采样率
            public double horizOffset; //中心点
            public double pixelOffset; //又一个水平偏移
            public float horiz_uncertainty; //samplerate/4
            public UInt16 timeBase; //水平档位
            public UInt16 fixed_Vert_Gain; //垂直档位
        };

        public static Dictionary<string, trc_field_define> dicOfFields = new Dictionary<string, trc_field_define>() { };


        static public bool WriteTrcFromCsv(float sampleRate, float volPerAd, uint[] sampleData, FileInfo fi)
        {
            bool ret  = false;

            /*
             * %Header
               %用户文本块
                    TEXT % 视上面定义的长度而定
               % TRIGTIME
                    TRIGGER_T % 8B f 原名结尾是TIME,但与前面定义重复,故改为T
                    TRIGGER_OFFSET % 8B f
               % RISTIME
                    RIS_OFFSET % 8B f
               % DATA_ARRAY_1
                    DATA_ARRAY_1
               % DATA_ARRAT_2
                    DATA_ARRAY_2
               % SIMPLE
                    SIMPLE int16模式
               % DUAL
                    版权声明:本文为CSDN博主「Surrea1」的原创文章,遵循CC 4.0 BY - SA版权协议,转载请附上原文出处链接及本声明。
                    原文链接:https://blog.csdn.net/Surrea1/article/details/126807087
            */
            try
            {
                int totallength = lecroy_trc_header.Length + 2 * sampleData.Length - 11; //no 11 more
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("#9{0:000000000}", totallength);

                trcHeaderFields headerFields;
                headerFields.totalLength = sb.ToString();
                headerFields.timeDataLength = sampleData.Length;
                headerFields.sampleDataLength = sampleData.Length;
                headerFields.allDataLength = sampleData.Length * 2; //in bytes.
                headerFields.horizInterval = sampleRate;
                headerFields.horizOffset = 0;
                headerFields.horiz_uncertainty = sampleRate / 4;
                headerFields.pixelOffset = 0;
                headerFields.pntsPerScreen = sampleData.Length;
                headerFields.lastvalidPnts = sampleData.Length-1;
                headerFields.vertical_gain = volPerAd; //垂直增益
                headerFields.vertical_offset = 0; //垂直偏移
                headerFields.timeBase = 15;
                headerFields.fixed_Vert_Gain = 1; //垂直增益

                byte[] header = new byte[lecroy_trc_header.Length];
                for (int i = 0; i < header.Length; ++i)
                {
                    header[i] = 0;
                }
                lecroy_trc_header.CopyTo(header, 0);


                if (dicOfFields.Count == 0)
                {
                    foreach (trc_field_define i in trc_header_fields)
                    {
                        if (dicOfFields.ContainsKey(i.standardName)) continue;
                        dicOfFields.Add(i.standardName, i);
                    }
                }
                Encoding.ASCII.GetBytes(headerFields.totalLength).CopyTo(header, dicOfFields["totalLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.timeDataLength).CopyTo(header, dicOfFields["timeDataLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.sampleDataLength).CopyTo(header, dicOfFields["sampleDataLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.allDataLength).CopyTo(header, dicOfFields["allDataLength"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.horizInterval).CopyTo(header, dicOfFields["horizInterval"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.horizOffset).CopyTo(header, dicOfFields["horizOffset"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.horiz_uncertainty).CopyTo(header, dicOfFields["horiz_uncertainty"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.pixelOffset).CopyTo(header, dicOfFields["pixelOffset"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.pntsPerScreen).CopyTo(header, dicOfFields["pntsPerScreen"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.lastvalidPnts).CopyTo(header, dicOfFields["lastvalidPnts"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.vertical_gain).CopyTo(header, dicOfFields["vertical_gain"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.vertical_offset).CopyTo(header, dicOfFields["vertical_offset"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.timeBase).CopyTo(header, dicOfFields["timeBase"].offetIdxbase0);
                BitConverter.GetBytes(headerFields.fixed_Vert_Gain).CopyTo(header, dicOfFields["fixed_Vert_Gain"].offetIdxbase0);

                FileStream fs = new FileStream(fi.FullName, FileMode.OpenOrCreate, FileAccess.Write);
                BinaryWriter bw = new BinaryWriter(fs);

                /*(byte[] zero24 = new byte[24];
                for (int i = 0; i < zero24.Length; ++i)
                {
                    zero24[i] = 0;
                }
                bw.Write(zero24);*/
                
                UInt16 min = UInt16.MaxValue;
                UInt16 max = UInt16.MinValue;
                foreach (uint data in sampleData)
                {
                    UInt16 d16 = (UInt16)data;
                    if(min>d16) min = d16;
                    if(max<d16) max = d16;
                }
                BitConverter.GetBytes((float)min).CopyTo(header, dicOfFields["min"].offetIdxbase0);
                BitConverter.GetBytes((float)max).CopyTo(header, dicOfFields["max"].offetIdxbase0);
                bw.Write(header);
                foreach (uint data in sampleData)
                {
                    UInt16 d16 = (UInt16)data;
                    bw.Write(BitConverter.GetBytes(d16));
                }

                bw.Flush();
                fs.Close();
                ret = true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return false;
            }

            return ret;

        }
    }
}

附件3:Win10+平台可直接使用的转换工具

csv=>.trc lecroy bin格式波形文件转换工具【命令行+窗体软件】https://download.csdn.net/download/twicave/87847367

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/26341.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

研发工程师玩转Kubernetes——使用Ingress进行路由

依据微服务理念&#xff0c;我们希望每个独立的功能由一个服务支持。比如有两个接口&#xff1a;http://www.xxx.com/plus和http://www.xxx.com/minus&#xff0c;前者由一个叫plus-service的服务支持&#xff0c;后者由一个叫minus-service的服务支持。这样就需要一个路由层&a…

Revit问题:创建牛腿柱和快速生成圈梁

一、Revit中如何用体量创建牛腿柱 牛腿&#xff1a;悬臂体系的挂梁与悬臂间必然出现搁置构造&#xff0c;通常就将悬臂端和挂梁端的局部构造&#xff0c;又称梁托。牛腿的作用是衔接悬臂梁与挂梁&#xff0c; 并传递来自挂梁的荷载。牛腿柱可以用于桥梁、厂房的搭建&#xff0c…

西南财经大学李玉周:数智化技术广泛使用推动管理会计加快落地

近日&#xff0c;由用友主办的「智能会计 价值财务」2023企业数智化财务创新峰会收官站圆满举办。来自知名院校的专家学者、央国企等大型企业财务领路人相约成都&#xff0c;一同见证“智能会计”新时代的到来&#xff0c;并肩探讨“价值财务”新主张。 为更好传递智能会计对企…

【接口测试】JMeter接口关联测试

‍‍1 前言 我们来学习接口管理测试&#xff0c;这就要使用到JMeter提供的JSON提取器和正则表达式提取器了&#xff0c;下面我们来看看是如何使用的吧。 2 JSON提取器 1、添加JSON提取器 在线程组右键 > 添加 > 后置处理器 > JSON提取器 2、JSON提取器参数说明 N…

chatgpt赋能python:Python如何删除行:从入门到精通

Python如何删除行&#xff1a;从入门到精通 在Python编程中&#xff0c;删除行是必不可少的操作之一。无论是清除不必要的数据&#xff0c;还是在数据集中删除重复行&#xff0c;或者在文本文件中删除某些行&#xff0c;删除行都是一项极其重要的任务。 什么是Python语言&…

Shell脚本攻略:文本三剑客之sed

目录 一、理论 1.sed 二、实验 1.sed命令的寻址打印 2.显示奇偶 3.查找替换 4.后向引用 一、理论 1.sed (1) 概念 sed 英文全称为stream editor流式编辑器&#xff0c;sed 对输入流&#xff08;文件或来自管道的输入&#xff09;执行基本文本转换单通过流&#xff0c;…

Matlab进阶绘图第22期—不等宽柱状图

不等宽柱状图是一种特殊的柱状图。 与常规柱状图相比&#xff0c;不等宽柱状图可以通过柱高与柱宽分别表达两个维度的数据&#xff0c;因此在多个领域得到应用。 在《Matlab论文插图绘制模板第91期》中&#xff0c;虽有介绍过利用Matlab自带bar函数绘制不等宽柱状图的方法&am…

高完整性系统(7)Formal Verification and Validation

文章目录 Specification Process 规格化过程State Invariants案例check ... expect Alloy是一种用于构建和检查抽象模型的语言和工具。当Alloy说所有断言都成立时&#xff0c;这意味着你的模型或规格在给定范围内已成功通过了所有的断言检查。换句话说&#xff0c;对于你所定义…

C#实例:多功能Windows窗体应用程序Helloworld_WinForm

有了创建一个Windows窗体应用程序的经验&#xff0c;就可以开始尝试运用更多的控件实现更多丰富的功能界面。以下分享我基于项目Helloworld_WinForm使用常用C#Windows窗体控件实现一些小功能。 每一节标题为所用到的控件&#xff0c;全文以实际制作过程为序编制。 目录 WinFor…

来了解一下白盒测试,黑盒测试,灰盒测试吧(超详解~)

根据被测对象的不同&#xff0c;软件测试可以分为白盒测试、黑盒测试、灰盒测试三种方式。那么&#xff0c;这三种测试方式具体是如何运行的&#xff1f;各有什么特点&#xff1f;下面&#xff0c;跟着静姐一起了解一下吧&#xff01; 01、白盒测试 WHITE BOX ●概念&#x…

PACS影像解决方案

现代医学影像技术的迅猛发展&#xff0c;使得PACS系统已逐渐成为各级医院实现信息化建设的重要组成部分。医学影像技术的进步也提升了医学影像的清晰度&#xff0c;推动二维PACS向三维升级转变。这一切都使得医学影像数据量激增&#xff0c;加之医疗行业法规的数据保存要求&…

Android平台OpenCV入门

一、导入OpenCV 别忘记把libopencv_java3.so添加进来。 二、初始化 OpenCVLoader.initDebug();三、常用方法 1. CvType 数据类型 以CV_64FC2为例&#xff0c;64指64位&#xff0c;F指浮点数&#xff0c;C指通道&#xff0c;2为2通道。 数值具体类型取值范围CV_8U8 位无符…

软件工程导论(四)软件编码测试与维护

一、软件编程 1.1良好的编程习惯 变量命名有意义并且使用统一的命名规则 编写自文档代码&#xff08;序言性注释 or 行内注释&#xff09; 提前进行可维护性考量&#xff08;可以用常量的方式存在的数值最好以变量的方式存在&#xff09; 良好的视觉安排可以提高代码的可读性(…

SOLIDWORKS技巧培训-绘制零件滚花的两种方法

最近常有朋友咨询SolidWorks零件如何做滚花的效果&#xff0c;下面给大家整理了绘制零件滚花的一个培训教程&#xff1a; 作为机械设计师&#xff0c;滚花应该都不陌生&#xff0c;真要说起来&#xff0c;滚花绘制其实也不算难&#xff0c;跟着我们一步一步来&#xff0c;应该…

ThreeJS 炫酷特效旋转多面体Web页 Demo 01《ThreeJS 炫酷特效制作》

本案例为一个 threejs 的特效网页&#xff0c;大小球体进行包裹&#xff0c;外球体为透明材质&#xff0c;但是进行了线框渲染&#xff0c;使其能够通过外球踢查看其内球体。 注&#xff1a;案例参考源于互联网&#xff0c;在此做代码解释&#xff0c;侵删 本案例除 ThreeJS 外…

chatgpt赋能python:Python如何分割列表

Python如何分割列表 介绍 在Python编程中&#xff0c;列表是一种非常常见的数据类型。有时候我们需要将一个大的列表分割成几个小的列表&#xff0c;以便更好地处理数据。Python提供了多种方法来实现这个目的。在本文中&#xff0c;我们将介绍Python中如何分割列表的几种方法…

活动预告 | 中国数据库联盟(ACDU)中国行定档深圳,一起揭秘数据库前沿技术

在当今数字化时代&#xff0c;数据库是各行各业中最核心的信息管理系统之一。随着技术的飞速发展&#xff0c;数据库领域也不断涌现出新的前沿技术和创新应用。数据库运维和开发人员需要紧跟前沿技术&#xff0c;才能保持竞争力&#xff0c;并实现更高效、更智能、更人性化的应…

pytorch实战 -- 神经网络

softmax的基本概念 交叉熵损失函数 模型训练和预测 在训练好softmax回归模型后&#xff0c;给定任一样本特征&#xff0c;就可以预测每个输出类别的概率。通常&#xff0c;我们把预测概率最大的类别作为输出类别。如果它与真实类别&#xff08;标签&#xff09;一致&#xff0…

Java 数组

文章目录 一、Java 数组总结 一、Java 数组 Java 语言中提供的数组是用来存储固定大小的同类型元素。 你可以声明一个数组变量&#xff0c;如 numbers[100] 来代替直接声明 100 个独立变量 number0&#xff0c;number1&#xff0c;…&#xff0c;number99。 Java 数组的声明、…

Linux内存初始化-启动阶段的内存初始化

本文代码基于ARM64平台, Linux kernel 5.15 在加载kernel 之前&#xff0c; kernel对于系统是有一定要求的&#xff0c;明确规定了boot阶段必须要把MMU关闭&#xff1a; arch/arm64/kernel/head.S/** Kernel startup entry point.* ---------------------------** The require…