Re: [Radiance-dev] dctimestep binary output
Nathaniel, the ReadSingle() or ReadDouble() methods of the System.IO BinaryReader class may do your job. Give those a try. If they don't work, try ReadBytes() in conjunction with those BitConverter methods you've been working with. Key, though: you probably want to be using BinaryReader. -- Randolph M. Fritz || rmfri...@gmail.com On Mon, Apr 16, 2018 at 5:42 PM, Nathaniel Jones <nathaniel...@gmail.com> wrote: > Hi all, > > I'm trying to read the binary output from dctimestep run with the -od > argument. The idea is that the binary files appear to be a lot faster to > save and load than text. However, I'm having a problem reading the binary > values. > > Values less than 512 read in just fine. However, binary values greater > than 512 are being converted to what look like random values between 31 and > 32. Upon looking at the binary file, it looks like the first three bytes of > each double are zero. Of course, I'm not even sure of the endianness of the > data. > > I'm also not sure how to test whether the issue is in my reader or in the > dctimestep output. Here's my C# code to read the values, in case anyone > wants to do a deep dive here: > > byte[] bytes = System.Text.Encoding.ASCII.GetBytes(buffer, 0, ncols * > ncomp * sizeof(double)); > for (int j = 0; j < ncols; j++) > { >double r = BitConverter.ToDouble(bytes, j * ncomp * sizeof(double)); >double g = BitConverter.ToDouble(bytes, (j * ncomp + 1) * > sizeof(double)); >double b = BitConverter.ToDouble(bytes, (j * ncomp + 2) * > sizeof(double)); >irradiance.Add(Bright(r, g, b), path); > } > > Any help debugging this would be appreciated! > > Nathaniel > > ___ > Radiance-dev mailing list > Radiance-dev@radiance-online.org > https://www.radiance-online.org/mailman/listinfo/radiance-dev > > ___ Radiance-dev mailing list Radiance-dev@radiance-online.org https://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] specifying X11 location
I see I didn't make clear that in these procedures ssh sets the DISPLAY variable on the Amazon Linux instance, so that one need only connect and ideally everything else just works. -- Randolph M. Fritz || +1 206 659-8617 || rmfri...@gmail.com On Sun, Apr 8, 2018 at 4:55 PM, Randolph M. Fritz <rmfri...@gmail.com> wrote: > As far as specifying X11 location; if this is a need – and I have found it > sometimes useful – the usual way this is done is via an X server running on > your desktop system and ssh. The specifics depend on the details of the > desktop system. If it is a Windows system, the inexpensive solution is the > Xming X server and the PuTTY application. This page gives a summary of the > setup procedure: http://www.geo.mtu.edu/geoschem/docs/putty_install.html. > On a Mac, one uses XQuartz and the usual Mac terminal application. > Unix-like systems run X11 natively, and one can simply use ssh from a > window. For all of these, you may have to turn X Windows ssh access on on > your Amazon LInux instance. > > -- > Randolph M. Fritz || +1 206 659-8617 || rmfri...@gmail.com > > On Sun, Apr 8, 2018 at 11:47 AM, Lars O. Grobe <gr...@gmx.net> wrote: > >> Hi Philip, >> >> don't worry about the "healthy state" of the executables. Make sure that >> you have oconv ("pre-sorting" your geometry), vwrays (generating rays for >> given projections), rtrace (the fundamental ray-tracer), rpict (a >> ray-tracer for images), rcalc (a calculator for tabular data), and the >> various generators (especially gensky). As long as they build, they will >> do, and you may simply ignore build errors as long as you get what you need. >> >> From the lib directory, you will at least need rayinit.cal. If you are >> aiming at CBDM, you also need the directional basis definitions according >> to Klems, Reinhart et al. These are somewhat scattered over directorys, >> best is to check your particular commands and collect them from the source >> tree in one central lib-directory which you would include in your RAYPATH. >> The various .cal-files have descriptions of their intended use included as >> comment lines, they are useful (e.g. for interpolation, mapping, color >> conversions) and definitely worth browsing, but not critical for plain >> ray-tracing. >> >> Cheers, Lars. >> >>> Do you just mean that we could have ignored the X11-related compilation >>> errors? (we bothered to include X11 libraries at build time to get as >>> clean >>> a compilation as possible, to be sure that the binaries we get out of the >>> build are in a healthy state). Or do you mean this implies certain >>> auxiliary files can be excluded? >>> >>> >> ___ >> Radiance-dev mailing list >> Radiance-dev@radiance-online.org >> https://www.radiance-online.org/mailman/listinfo/radiance-dev >> > > ___ Radiance-dev mailing list Radiance-dev@radiance-online.org https://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] specifying X11 location
As far as specifying X11 location; if this is a need – and I have found it sometimes useful – the usual way this is done is via an X server running on your desktop system and ssh. The specifics depend on the details of the desktop system. If it is a Windows system, the inexpensive solution is the Xming X server and the PuTTY application. This page gives a summary of the setup procedure: http://www.geo.mtu.edu/geoschem/docs/putty_install.html. On a Mac, one uses XQuartz and the usual Mac terminal application. Unix-like systems run X11 natively, and one can simply use ssh from a window. For all of these, you may have to turn X Windows ssh access on on your Amazon LInux instance. -- Randolph M. Fritz || +1 206 659-8617 || rmfri...@gmail.com On Sun, Apr 8, 2018 at 11:47 AM, Lars O. Grobe <gr...@gmx.net> wrote: > Hi Philip, > > don't worry about the "healthy state" of the executables. Make sure that > you have oconv ("pre-sorting" your geometry), vwrays (generating rays for > given projections), rtrace (the fundamental ray-tracer), rpict (a > ray-tracer for images), rcalc (a calculator for tabular data), and the > various generators (especially gensky). As long as they build, they will > do, and you may simply ignore build errors as long as you get what you need. > > From the lib directory, you will at least need rayinit.cal. If you are > aiming at CBDM, you also need the directional basis definitions according > to Klems, Reinhart et al. These are somewhat scattered over directorys, > best is to check your particular commands and collect them from the source > tree in one central lib-directory which you would include in your RAYPATH. > The various .cal-files have descriptions of their intended use included as > comment lines, they are useful (e.g. for interpolation, mapping, color > conversions) and definitely worth browsing, but not critical for plain > ray-tracing. > > Cheers, Lars. > >> Do you just mean that we could have ignored the X11-related compilation >> errors? (we bothered to include X11 libraries at build time to get as >> clean >> a compilation as possible, to be sure that the binaries we get out of the >> build are in a healthy state). Or do you mean this implies certain >> auxiliary files can be excluded? >> >> > ___ > Radiance-dev mailing list > Radiance-dev@radiance-online.org > https://www.radiance-online.org/mailman/listinfo/radiance-dev > ___ Radiance-dev mailing list Radiance-dev@radiance-online.org https://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Meta files and library
Just to be confusing "gnuplot" and "GNU plotutils" are entirely different programs. The gnuplot developers had the name first and are keeping it. In any event, the GNU plotutils will, as far as i know, work with plotin and (if it is resurrected) plotout. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Meta files and library
> > > Ah, so "plot files" are indeed something different from "graph files". > > Since the plot(5) man page presumably documenting that format is gone, > > keeping a program around that depends on it doesn't make much sense. > > Well, it was never my package, so I've no idea if it's still "out there," > somewhere. Used to be standard on BSD Unix, anyway. Anyone else know what > we're talking about? > > Plot goes all the way back to Unix v7. It appears that the GNU plotting utilities (https://www.gnu.org/software/plotutils/), not to be confused with gnuplot will still read the format. So I suppose it is still "out there," but I am not sure that it matters much any more. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] running genBSDF
What's in blind1.rad? ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Glrad on Linux
On Apr 27, 2016 6:50 PM, "Douglas L Reeder"wrote: > > Randolph, > > On os x with a logitech 3 button mouse with the center button being a mouse wheel xev returns button 1 for the left button, 2 for depressing the wheel, 3 for the right button, and 4 for rotating the wheel. > > Hunh, interesting. Did you try rotating the wheel both ways? ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Glrad on Linux
I have confirmed using xev that button 4 is scroll up and 5 is scroll down on Mac OS. Anything fancier, I don't know. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Python scripts for Radiance
My impression is that Python has become something of a standard in the research community, with tools like SciPy, NumPy, and SAGE widely used, though Perl has a library comparable to NumPy in PDL, and there is a SciRuby, There is nothing else like SAGE except for the commercial packages Mathematica and MATLAB. There is also the granddaddy of them all, LISP, but I don't want to press that on our community; it is intimidating, however useful once one learns it. On the statistical side there is R and (wince) Excel. What do people think? Who is using what? Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Python scripts for Radiance
Greg: > > Well, we may need to devise some tests to be sure this is still a > problem, but in the past, Windows would deliver binary files in > 128-byte chunks, meaning that the last chunk might have garbage at the > end of it that was not actually produced by the program that sent it. > Schorsch > That sounds like a severely broken implementation. I can't possibly > imagine this still to be the case. If there's a test case, I'll check > it out. It's a hang-over from MS-DOS and its FAT filesystem, which measured files in blocks rather than bytes. I'd be surprised if Windows NTFS has the problem, *but* memory sticks still use a FAT filesystem, so the problem may emerge when transporting files on a memory stick. That's a case to test. Greg, I once tried writing all my project scripts in Python. Ultimately I got sick of it and reverted to csh. But for the a-bit-more-than-a-script problems that Schorsh is talking about, Python is an enormous help, making the development process faster and less error-prone. Compared to any shell, Python makes it easier to write correct code. Compared to C, python is far more concise, making coding much faster, which is why we don't just use C instead. And, truly, it does not impose the formal requirements that Java or C++ does. I wish you would give it another look before deciding it's hopeless. And back to work with me. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Python scripts for Radiance
The problem that code solves is finding the name of the invoked command and getting rid of the Windows .exe extension. I'd write it a bit differently: from os.path import basename, splitext ... progname = splitext(basename(sys.argv[0]))[0] (or, at length) progfile = basename(sys.argv[0]) progname = splitext(progfile)[0] On the other hand, it probably ought to be encapsulated somewhere in a function or class, so that one does not have to look at it too much. :-) The binary EOF thing was a problem of the old FAT filesystem, which operated in blocks, and EOF was an actual character in the file. It is still present in NTFS, then? Say, what? ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Winrview and Winimage sources
On 3/16/16, 1:51 PM, "Randolph M. Fritz" <rmfri...@gmail.com> wrote: Why is Qt an especially onerous dependency? It's LGPL and pretty common. On Wed, Mar 16, 2016 at 12:54 PM, Guglielmetti, Robert < robert.guglielme...@nrel.gov> wrote: > Because it's so fuc*ing big. > When 2 GB RAM is standard for a low-end system is that important? Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] GitHub projects on geometry translation
Pronoun troubles: who is doing what to which where? So is this correct: 1. I first use the "fork" button to create my own copy of the repository on GitHub 2. Then I use "git clone" on my own system, referencing my fork. This downloads the repository to my system 3. Commit my changes on my system. 4. Use "push" on my system to upload my changes to my fork of the project on GitHub 5. Then use GitHub's "New Pull Request" button on your repository to submit a pull request to you, who will (if you like my changes) incorporate my changes in your repository. Git documents (and perhaps this is true of most free open source documentation) seem to be written by people who know git for people who know git. This makes the lives of people who don't know git difficult. ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Mark Stock's benchmark on native Windows Radiance
I favor xform with no options for this job; if the system has Radiance, I expect it will have xform, regardless of what other commands are or are not available. But, YMMV. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
[Radiance-dev] Mark Stock's benchmark on native Windows Radiance
Has anyone got this going? (Yes! I have managed to get it built and installed. No, I have no idea if it is actually working. More, later, when I've tested the thing.) Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Mark Stock's benchmark on native Windows Radiance
I am pleased to be able to say that, in fact, I ran a successful simulation. My hasty hack compilations of libtiff 3.9.7 (the last version 3 libtiff) and zlib 1.2.8 also worked, which was nice to see. Performance, well, not so good. It took 4219.9 wall clock seconds on a fairly capable Xeon, which is 1.5-2x slower than I expect based on the benchmark table. I suspect some tweaking of compilation options would considerably improve the performance, even with the relatively blah Microsoft VC10 compiler. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
[Radiance-dev] cmake / VS 2010 Express build problem
cmake version 2.8.11.1, Visual Studio version Express SP1. When I go to set up the cmake build (run configure in cmake) I get two warnings like: CMake Warning at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/InstallRequiredSystemLibraries.cmake:343 (message): system runtime library file does not exist: 'MSVC10_REDIST_DIR-NOTFOUND/x86/Microsoft.VC100.CRT/msvcp100.dll' Call Stack (most recent call first): CMakeLists.txt:144 (include) And then a spew of messages like: CMake Error at InstallRules/CMakeLists.txt:18 (get_filename_component): get_filename_component called with incorrect number of arguments The warnings are apparently a VS 2010 Express feature. No idea what to make of the incorrect number of arguments errors. How do I get this to work? Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] cmake / VS 2010 Express build problem
Got it. This is a bug, due to missing quotes in InstallRules\CMakeLists.txt. Lines 18-23 of that file should read: get_filename_component(qgif_plugin ${QT_QGIF_${qt_plugin_term}_RELEASE} NAME) get_filename_component(qico_plugin ${QT_QICO_${qt_plugin_term}_RELEASE} NAME) get_filename_component(qjpeg_plugin ${QT_QJPEG_${qt_plugin_term}_RELEASE} NAME) get_filename_component(qmng_plugin ${QT_QMNG_${qt_plugin_term}_RELEASE} NAME) get_filename_component(qsvg_plugin ${QT_QSVG_${qt_plugin_term}_RELEASE} NAME) get_filename_component(qtiff_plugin ${QT_QTIFF_${qt_plugin_term}_RELEASE} NAME) Not sure if I have an old version of InstallRules\CMakeLists.txt or if my configuration is different. ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] What are people using to compile Radiance on Windows?
Thanks. At the moment, I am downloading VS Express 2010 C++, that being the only no-charge version MS makes available to Vista users (well, it came with my workstation.) Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
[Radiance-dev] What are people using to compile Radiance on Windows?
In addition to MSVC and CMake, users need Qt and libtiff installed if they want the full complement of executables including the Windows rvu OK. Now, which versions of Qt and libtiff do I use? Do I download the libtiff source and let the cmake build it? Or...? And there are two Qt sites on the net! It looks like qt-project.org is the one to use, but then there are more decisions. Since you are using VS 2008, I suppose you are using Qt 4.8, but what is available to me as a VS 2010 user is Qt 5.0.2. Do I use the base version or the OpenGL version, or does that depend on the target platform? Enquiring minds, er, nevermind. I'm being reminded all over again why some of the old Bell Labs/Lucent/Google people don't like shared libraries. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] What are people using to compile Radiance on Windows?
Guglielmetti, Robert Robert.Guglielmetti@... writes: I use MS VisualStudio Express 2008 (v9) to make the so-called NREL binaries of Radiance Rob, are you creating a VS project to build Radiance? Or...? Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] compile radiance HEAD 3332 with cmake on command line / linux
The current cmake build files don't work on my Mac because I have multiple versions of the X11 include and library files on the system. Cmake unpredictably picks files from different versions and fails to build Radiance. On a machine with a clean install and nothing extra, the cmake build files will probably work. On a machine with the wrong history they produce unpredictable results. I have no idea what behaviors the cmake build files will produce across a broad range of other Unix systems. :-( I do have an attempt at a solution to the random X11 pieces on Mac problem, but it is not complete and not thorougly tested. I never got the libtiff part going on my system. Rob, if you'd like the X11 patches for your distribution, you can have them, but they will have to be tested. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
[Radiance-dev] Compiling Radiance with the Intel (Vectorizing) C Compiler
I've got it to compile...but rpict crashes. Anyone tried this before? Did you get it to work? -- Randolph M. Fritz • rfr...@lbl.gov Environmental Energy Technologies Division • Lawrence Berkeley Labs ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
[Radiance-dev] Possible bug found by Intel cc
In ambient.c: ambient.c(521): warning #279: controlling expression is constant aflock(creat ? F_WRLCK : F_RDLCK); That seems odd. Is it possible that it was supposed to be: aflock(cre8 ? F_WRLCK : F_RDLCK); -- Randolph M. Fritz • rfr...@lbl.gov Environmental Energy Technologies Division • Lawrence Berkeley Labs ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
Re: [Radiance-dev] Fix for compilation with gcc =4.5
Interesting--I would have thought that was a constant, since the value can be calculated at compile time. But then, it is asking a lot of the compiler to provide results consistent at run and compile times in that case. In The Old Days, I suppose a compiler would have just cavalierly ignored the issue, in the same way compilers assume that computer arithmetic is associative and commutative. Randolph On 2011-02-18 08:59:04 -0800, Bernd Zeimetz said: Hi, building radiance fails with gcc =4.5 with rhdobj.c:221:15: error: storage size of 'neighlist' isn't constant which is due to the fact that using a define like #define NAZI((int)(PI/2.*NALT+.5)) to define the size of an array is not allowed - gcc 4.5 implements various details of the standard stricter than versions before. Attached patch fixes that, not sure if it is the best way to handle it - I didn't check if NAZI or NALT will be redfined somewhere. The issue should be fixed in some way, though. Cheers, Bernd -- Randolph M. Fritz • rfr...@lbl.gov Environmental Energy Technologies Division • Lawrence Berkeley Labs ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev
[Radiance-dev] .dat files missing from 4.0 Debian packages
The following files: ./src/gen/defangle.dat ./src/gen/coeff_perez.dat Are not in the Debian version of Radiance 4.0, version 4R0+20100620-1. They belong in /usr/share/radiance. Randolph ___ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev