Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.974.297 Times

pysdif 0.1.0

Company: Eduardo Moguillansky
Date Added: September 14, 2013  |  Visits: 279

pysdif

Report Broken Link
Printer Friendly Version


Product Homepage
Download (16 downloads)



pysdif is a Python library that allows to read and write any kind of SDIF file, to define new kinds of frames and matrices and to read and write metadata.<br /><br />The matrices read from a sdif file are exposed as numpy arrays.<br /><br />It exposes both a low level and a high level interface.<br /><br />The low level interface for reading and writing sdif files mirrors the sdif library quite transparently so that the example files and utilities using it can be directly translated with it. In particular it does not create any intermediate objects, even the data of the matrices is a numpy array mapped to the c array read from disk, so no allocation takes place. Whereas this makes for very fast code, one has to take care to copy the data if it will be used longer, since by the time a new matrix is read this data is no longer valid.<br /><br />to read for ex. 1TRC format:<br /><br />import pysdif<br /><br />sdif_file = pysdif.SdifFile('filename.sdif')<br />sig1TRC = pysdif.str2signature("1TRC")<br />while not sdif_file.eof:<br /> sdif_file.read_frame_header()<br /> if sdif_file.frame_numerical_signature) == sig1TRC:<br /> print sdif_file.time<br /> for n in range(sdif_file.matrices_in_frame):<br /> sdif_file.read_matrix_header()<br /> if sdif_file.matrix_numerical_signature == sig1TRC:<br /> data = sdif_file.get_matrix_data()<br /> # data is now a numpy array but you must copy the data if<br /> # you intend to keep it after you have read the matrix.<br /> # One you read a new matrix, this data will be no longer valid<br /> print data<br /><br />a more natural way:<br /><br />from pysdif import SdifFile<br />sdif_file = SdifFile('filename.sdif')<br />for frame in sdif_file:<br /> if frame.signature == "1TRC":<br /> print frame.time<br /> for matrix in frame:<br /> if matrix.signature == "1TRC":<br /> print matrix.get_data()<br /><br />the frames and the matrices resulting from the iteration are only guaranteed to be valid as long as no new frames and matrices are read<br /><br />to write a SdifFile:<br /><br />f = SdifFile('new_sdif.sdif', 'w')<br /># these are optional<br /># add some metadata<br />f.add_NVT({<br /> 'name' : 'my name',<br /> 'date' : time.asctime(time.localtime())<br />})<br /># define new frame and matrix types<br />f.add_frame_type('1NEW', '1ABC NewMatrix, 1FQ0 New1FQ0')<br />f.add_matrix_type('1ABC', 'Column1, Column2')<br /># now you can begin adding frames<br />frame = f.new_frame('1NEW', time_now)<br />frame.add_matrix('1ABC', array([<br /> [0, 1.2],<br /> [3.5, 8.13],<br /> ...<br /> ]))<br />frame.write()<br /><br /># say we just want to take the data from an existing<br /># sdiffile, modify it and write it back<br />in_sdif = SdifFile("existing-file.sdif")<br />out_sdif = SdifFile("outfile.sdif", "w")<br />out_sdif.clone_definitions(in_sdif)<br />for in_frame in in_sdif:<br /> if in_frame.signature == "1NEW":<br /> new_frame = out_sdif.new_frame("1NEW", in_frame.time)<br /> in_data = in_frame.get_matrix_data() # we know there is only one matrix<br /> # multiply the second column by 0.5<br /> in_data[:,1] *= 0.5<br /> new_frame.add_matrix('1ABC', in_data)<br /> new_frame.write()<br /><br />#md5=d9129a6bd3158365f5132a075a9e1274

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Array Data Date Define Files Frame Frames Level Library Longer Matrices Matrix Name039 Numpy Print Pysdif Quot Trcquot Sig Trc Valid Write
Users rating: 0/10

License: Freeware Size: 153.6 KB
USER REVIEWS
More Reviews or Write Review


PYSDIF RELATED
Development Editors  -  Free Hex Editor Neo 4.97.02.3667
View, Edit and Analyze Hexadecimal Data and Binary Files of any Size. Free Hex Editor Neo is a large files optimized freeware hex editor for everyone who works with ASCII, hex, decimal, float, double and binary data. Make patches with just two...
8.33 MB  
Libraries  -  libXEL 0.1.3
libXEL is an event log library that stores log data in SQLite files and is capable of exporting it as XML and CSV. It provides a set of C/C++ preprocessor macros for project integration. It can gather some information about the system at run time....
337.92 KB  
Development Tools  -  QuickTemplate 5.0.1
QuickTemplate class can manage a multi-level template (you can define blocks and multi-level nested blocks.) You can define simples varibles like {MYNAME} or {MYAGE}, or you can define an associative array which include all needed keys like:...
 
Weather  -  FireDanger 1.0.0.0
This app keeps you up to date with the fire danger level in your area. Pin a live tile and stay in the know! Data is pulled from the Wildland Fire Assesment System (wfas.net), which is only updated once a day at 5pm MST. Not all regions are...
1024 KB  
Business  -  Ultra AutoCAD Tool 4.2.1
Ultra AutoCAD Tool is a powerful batch utility program for AutoCAD drawing files. Features include: extract data from drawing files (CSV, XML, HTML), create DXFs from DWGs, find and replace text, find and replace block attribute values, find and...
271 KB  
Libraries  -  Config::FreeForm 0.01
Config::FreeForm is a Perl module that provides in-memory configuration data. SYNOPSIS use Config::FreeForm %options; Config::FreeForm provides in-memory configuration data in a free-form manner. Many existing configuration modules attempt...
5.12 KB  
File Synchronizers  -  e2undel 0.82
e2undel is an interactive console tool that recovers the data of deleted files on an ext2 file system under Linux. Included is a library that allows to recover deleted files by name. It does not require any knowledge about the secrets of the...
55.3 KB  
Multimedia & Graphics  -  Integrated Genome Browser 6.6.3 B9527
The Integrated Genome Browser (IGB, pronounced Ig-Bee) is an interactive, zoomable, scrollable software program you can use to visualize and explore genome-scale data sets, such as tiling array data, next-generation sequencing results, genome...
8.4 MB  
Search & Replace Tools  -  CI Hex Viewer (Linux) 1.3
CI Hex Viewer is a hexadecimal viewer and editor specially designed to facilitate low-level data processing. The software allows to analyze and edit raw binary data of both files and disks of any size. This program enables handling data on hard...
1.86 MB  
Automotive Information Databases  -  Repair MDF File Free 1.0
Repair MDF File Free is a fast and effective tool for recovering corrupted data from database files, Microsoft SQL Server (. mdf files). As a result, no foreseeable situations, your data is stored in databases Microsoft SQL Server may be lost or...
1.88 MB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB