Open source CalcZAF code

139 views
Skip to first unread message

Hendrix Demers

unread,
Jun 19, 2015, 8:24:29 AM6/19/15
to openmicr...@googlegroups.com
John Donovan (from University of Oregon and Probe Software) has offer to release the CalcZAF code (http://www.probesoftware.com/Technical.html) in the openMicroanalysis project.Which is a very generous offer and a good fondation to start the openMicroanalysis project. But before we jump into the code and start having fun, we have to go through a couple of administrative/legalese steps.

The first step is to get the agreement of all contributors of CalcZAF code to release as open source. 

The second step is to chose a licence for the code. John should let us know if he want to use some of the code into his Probe for EPMA software. In that case a MIT style licence is better. See this section in the Producing Open Source software book for overview of open source licences: http://producingoss.com/en/license-choosing.html.

The last step will be to prepare all files for release: add copyright and licence info, maybe remove sensitive comments (like personal information, bad word, contract information if the code was added for a client, ...).

All these steps are new for us, so we may take us some time to do them correctly, but it should give us a good example how to proceed in the future.

Thanks again John!

Hendrix

donovan

unread,
Jun 20, 2015, 12:25:58 PM6/20/15
to openmicr...@googlegroups.com
Ok, I can contact (myself), John Armstrong, and Gareth Seward as I think these are the only developers involved in the CalcZAF and Standard codes.

Is there a form letter which I can utilize as a basis for contacting them to allow the code to be released?

Yes, I would like to keep utilizing the CalcZAF/Standard code in Probe for EPMA, so the "MIT" style license sounds good I guess.  What do I need to do to begin this process?

I will work on preparing the code, but I don't think there are any "bad words" in there! 
john

donovan

unread,
Jun 20, 2015, 12:44:40 PM6/20/15
to openmicr...@googlegroups.com
Right now all the files in my CalcZAF/Standard source say

' (c) Copyright 1995-2015 by John J. Donovan

at the top.  I assume I will be changing this text.  What should I change it to?

The other issue is that I realize now that I've utilized some code from Numerical Recipes (1986). Basically I converted it to Visual Basic and made various modifications including adding error trapping and handling. All routines which use some Numerical Recipes code are marked with this:

Modified From Numerical Recipes.

Is this OK, or is there some else we need to do?
john

Hendrix Demers

unread,
Jun 22, 2015, 6:50:00 PM6/22/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

See my answers below.

Hendrix

On Saturday, June 20, 2015 at 12:25:58 PM UTC-4, donovan wrote:
Ok, I can contact (myself), John Armstrong, and Gareth Seward as I think these are the only developers involved in the CalcZAF and Standard codes.

Is there a form letter which I can utilize as a basis for contacting them to allow the code to be released?
I think the a Contributor License Agreements (CLA) could be used for you, John and Gareth.
See this link with a discussion and two examples http://producingoss.com/en/contributor-agreements.html.

For future contributor to the code, we could use similar CLA and with the MIT style licence and you could still use their contribution in Probe for EPMA.

I will check the two examples (and google for other) and draft a CLA for the openMicroanalysis project that you can use.


Yes, I would like to keep utilizing the CalcZAF/Standard code in Probe for EPMA, so the "MIT" style license sounds good I guess.  What do I need to do to begin this process?
I think the first step is you review the MIT license http://opensource.org/licenses/MIT and be certain it work for you.
After that you need to add a notice about the license in each file (with the copyright you already have). As the MIT license is very short you can include the full copy in each file. You also need a LICENSE file in the main folder of the code or program file with a copy of the MIT licence in it and on your website.


I will work on preparing the code, but I don't think there are any "bad words" in there! 
It was just in case you have a French-Canadian contributor;)

Hendrix Demers

unread,
Jun 22, 2015, 7:00:57 PM6/22/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

See my previous post, but you need to add the license notice with the copyright.

I forgot to mention to check for third party code. For Numerical Recipes, they are strict, we cannot distribute the code even if it is a translation. See http://www.nr.com/licenses/redistribute.html.
Can you post a list of algorithm you need to replace the one from Numerical Recipes, I am sure we can find another library with them and use it in the CalcZAF code. As a temporary solution, can you make a library of all NR code you use and call it from CalcZAF? We can redistribute binary version of the NR code. 

Hendrix

Philippe Pinard

unread,
Jun 23, 2015, 8:23:56 AM6/23/15
to openmicr...@googlegroups.com, hendri...@gmail.com
John, Hendrix,

I find the questions and decisions regarding copyright and license should be discussed separately as these issues may become relevant to other code donations or new projects. I created a new post for this: https://groups.google.com/forum/#!category-topic/openmicroanalysis/developers/XpW37M4J_A4

Philippe

Hendrix Demers

unread,
Jun 23, 2015, 6:22:59 PM6/23/15
to openmicr...@googlegroups.com, philipp...@gmail.com, hendri...@gmail.com
Philippe,

Maybe split your post in two: one for the license and one for the copyright.

Hendrix

donovan

unread,
Jun 25, 2015, 10:45:02 AM6/25/15
to openmicr...@googlegroups.com
Hi Hendrix,
I'm sure John Armstrong and Gareth will sign the open source copyright for CalcZAF/Standard and I know I can easily add the open source notice to each source file and I could even get the Numerical Recipes code into a binary, but I now realize that there are other 3rd party tools that need to be included for the project to compile. These 3rd party tools can be distributed for "run-time" use to end users, but not for "design time" in the VB IDE by other developers. For running in the development environment or re-compiling the project, a non-distributable license is generally required.

Maybe I should first ask about the open source philosophy because I know almost nothing about its goals and ideals.  Also I should probably mention my own goals and ideals in offering to open source CalcZAF/Standard so we all are on the same page.  I want the CalcZAF/Standard source code to be open sourced because I believe that science needs to be transparent to improve. And only if other scientists can examine my code, can they fully understand the benefits and the limitations of the code, and then begin to suggest or make changes to it. 

That said, I now need to ask you if, other 3rd party tools such as the graphics library and the TCP/IP library (for FTP/email, etc), *have* to be included with the original source when a code project is open sourced?   Is there a precedent to open source a code project but without all the 3rd party tools necessary to compile it, or does that defeat the purpose of the open source effort?

Please advise.
john

Hendrix Demers

unread,
Jun 25, 2015, 9:23:16 PM6/25/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

For the open source philosophy of the project, I have start a discussion here. The goals are very similar to your goals. The initial aim of the project is more to build basic building blocks (libraries) to be used in microanalysis code. For example, many open source projects are just library without the GUI or user interface. Other projects use these libraries to build a GUI or include them in a larger project. However, I don't recall a open source project that require a third-party tools to be used. Some time you need a third party compiler to compile the code on specific platform or specific framework, like microsoft .Net. In general, the goal of open source project is to be able to see the code and modify it, it does not need to be a full and complete software.

For CalcZAF, we could start by open source the "scientific" code, i.e., MAC, ZAF models, ... and keep the CalcZAF GUI with all the graphics and feature closed and available on your website. If later the community have an interest to make the GUI fully open source, we can start looking at open source alternative for the GUI, graphics and current features of CalcZAF.
What do you think? Could this separation of CalcZAF work for you?

I hope all these "problems" does not dampen your effort to open source CalcZAF. I found it a very good example for the project and good learning experience. At the end, I am sure all the work you put in open source it will repaid itself with the benefit of open source the code. Also if you need help to prepare the code, I am available to help you (however, I will have more time after MM2015).

Hendrix

donovan

unread,
Jun 27, 2015, 6:24:32 PM6/27/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi Hendrix,
Ok, I will start by releasing the full code with the exception of the Numerical Recipes code files which are:

In the meantime I will ask John Armstrong and Gareth Seward if they give permission to open source CalcZAF. Does this "permission" need to be written down anywhere or just an email saying OK?

I will also add this text to the source files we are distributing:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


Is that what I need to do?

john

donovan

unread,
Jun 27, 2015, 6:25:51 PM6/27/15
to openmicr...@googlegroups.com
Sorry I forgot to add the NR files I won't be open sourcing:

student.bas regress.bas spline.bas plan3d.bas

john

donovan

unread,
Jul 1, 2015, 11:50:26 AM7/1/15
to openmicr...@googlegroups.com
Hi Hendrix,
Ok, so Gareth Seward and John Armstrong have both said it is OK to release CalcZAF into open source.

I've added the open source copyright to all source files.  So I have a zip file now without the NR files. What do I do next?
john

Hendrix Demers

unread,
Jul 2, 2015, 7:29:53 PM7/2/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

I guest you have these two lines (or something similar) in the source files before the line: "Permission is hereby granted, free of charge ..."

The MIT License (MIT)

Copyright (c) 2015 John Donovan, John Armstrong and Gareth Seward

For John Armstrong and Gareth Seward, I think email is OK, maybe post a copy in the forum for future reference.

Hendrix

donovan

unread,
Jul 2, 2015, 7:43:05 PM7/2/15
to openmicr...@googlegroups.com
Hi Hendrix,
It says this:

' (c) Copyright 1995-2015 by John J. Donovan (credit to John Armstrong for original code)
Option Explicit
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal

donovan

unread,
Jul 2, 2015, 7:45:15 PM7/2/15
to openmicr...@googlegroups.com
On 7/1/2015 8:42 AM, Dr. John T. Armstrong wrote:
John,
That's a great idea. I'm fine with that.
Cheers,
John

Sent from John's Kindle

On June 30, 2015, at 11:10 PM, John Donovan <don...@probesoftware.com> wrote:

Hi Gareth and John,
I'm planning to open source my CalcZAF source code this summer and although you two are "just' secondary authors, I wanted to be all on the up and up and get confirmation from the both you that you have no 
objections to this.

Thanks and please let me know ASAP.
john

Hendrix Demers

unread,
Jul 2, 2015, 7:48:55 PM7/2/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

Philippe and I have compare a couple of open source repositories and github seem the most popular and include a lot of nice feature. We have created a openmicroanalysis organization for creating and hosting the openMicroanalysis project. See the comparison slide prepared by Philippe in attachment. One nice feature, it is free for open source project. Github uses git as distributed version control system with a step learning curve if you are not familiar with version control system. I think the advantage of distributed version control system over a simple version control system like subversion is worth the effort to learn it. But we are open to other hosting solution if you or other developer prefer them.

If you don't have any preference and what to try github, you can send us the zip and me or Philippe will create the project on github. I could try to find a couple of good introduction to github and write some documentation how to use it for the CalcZAF project this weekend.

Let me know what you think.

Regards,
Hendrix
sourceCodeHosting_Platforms.png

Hendrix Demers

unread,
Jul 2, 2015, 7:56:20 PM7/2/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

I think we should add the name of the license after the copyright, I just notice today that the MIT license does not mention it name in the text. It seem a small thing, but when I see the name of the license I just don't read it, but I have a good idea of the license.

The MIT License (MIT)

Hendrix

donovan

unread,
Jul 4, 2015, 1:04:21 AM7/4/15
to openmicr...@googlegroups.com
Hi Hendrix,
I understand version control though I do not use it myself at the moment. Though I am sure I will be utilizing it as I plan to migrate CalcZAF to VB.net!  Also, it is important to note that I usually update the CalcZAF source several times a week!

So I'm not sure what is the best open source method for the CalcZAF source code open sourcing.  Since I have no experience with github do you think a simple ZIP distribution is a viable alternative method for open sourcing? (I'm really not interested in a lot more work for myself!)  In other words, is there a place on this site where I can just make the latest CalcZAF ZIP file available to all and update it as I make changes to the source?

Basically I am wondering if it is better for me just to share the CalcZAF zip file here, so then anyone who wants to, can examine the latest source files and then suggest changes or revisions to us here, which I could then incorporate into the source base (or not as the case may be) if the changes are deemed worthy by all involved.  That is to say I'm sure the physics can be improved upon!

Would this ZIP distribution be a viable method for open sourcing CalcZAF do you think? 

In other words, I am saying that my main goal here to to make the CalcZAF (and Probe for EPMA) physics source examinable to all scientists as it should be for scientific transparency. I'm not asking for help in improving the physics unless that is of interest to someone out there...
john

donovan

unread,
Jul 5, 2015, 11:25:01 AM7/5/15
to openmicr...@googlegroups.com
Let me hasten to add that I am not opposed to using github, if we could do the project creation together and there is a mechanism for bulk updating, so I don't have to update every modified file one at a time...

Hendrix Demers

unread,
Jul 6, 2015, 10:12:34 AM7/6/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

No problem, with a download zip link. The only problem is you will have to manually process the changes or suggestions. But for starting, I think it is better to not make you work harder especially if you are not familiar with git. The most important is to have the code available somewhere.

Hendrix

Hendrix Demers

unread,
Jul 6, 2015, 10:24:59 AM7/6/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

Like I mentioned in my previous post, let start with a download zip file. Later we can decide if it will be easier for you and other developer to have a github project. I can help you for the project creation and first updating and also with the learning of git workflow. The git tool are easy to use (either command line or GUI), but you need to understand the basic concept of git project and how to incorporate them in you coding workflow. Once you have learn it, it is very easy to use and does not slow you done. 

Maybe we could have a short tutorial at MM2015 on how to use git. Philippe and me are planing to work on the openMicroanalysis project Friday August 7 at Portland. Let us know if you are interested to a git tutorial.

Hendrix

donovan

unread,
Jul 10, 2015, 10:11:04 PM7/10/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi Hendrix,
OK, I'll start with a link to my CalcZAF source distribution ZIP which will contain everything except for the Numerical Recipe routines and the 3rd party graphics and TCP/IP libraries.

Is there a way to create a "sticky" post where I can paste the source ZIP link at the top of the CalcZAF topic so it's not buried down here?  Or maybe even you could paste the link in your first CalcZAF post if it can be edited?

I would like to attend a discussion/presentation on using  github at M&M especially if it is on Monday or Tuesday when there isn't much EPMA stuff going on.
john

Hendrix Demers

unread,
Jul 13, 2015, 10:15:28 PM7/13/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

I can mark a post sticky and display at the top and I think you should be able to update your own post (on the web interface I can edit my post but not post from other people). Maybe it is better to start  an new topic with a clear subject to download the CalcZAF code and you can update the link to a new version by editing your post.

I can also add a link on the openMicroscopy website to the post so people can find it.

For the presentation/discussion, we can try to meet Monday, but I have a busy week for MM and this why I was planning to do it Friday when I am done with MM stuff.

Regards,
Hendrix

donovan

unread,
Jul 21, 2015, 11:11:39 AM7/21/15
to openmicr...@googlegroups.com
The latest version (10.9.6) of the CalcZAF source includes some minor tweaks to the (improved) Reed fluorescence relative line weights for Ka by Ma/Mb. The Pouchou database error distribution is here:

http://probesoftware.com/smf/index.php?topic=490.msg3085#msg3085

See the CalcZAF Source Download topic for the latest source code:

https://groups.google.com/forum/#!category-topic/openmicroanalysis/developers/HIKFhmYHxt4

Hendrix Demers

unread,
Jul 21, 2015, 2:26:30 PM7/21/15
to openmicr...@googlegroups.com, john.dono...@gmail.com
Hi John,

I have download the source and everything look good. To double check if you have remove all the files that you cannot include, this is the files not in the .zip, but referenced by the project file:
  • STUDENT.BAS
  • Regress.bas
  • Spline.bas
  • IOUpdate.bas
  • Unzip.frm
  • mUnzip.bas
  • cUnZip.cls
For compiling the code, which software and version you are currently using? I have open the project with Microsoft Visual Basic Express Edition, but it convert the file to .vb (and maybe to .net?). I have some error when I build it, but I can open the bas file and the frm. You mention in one of your post that your are planning to update the code to .net. Do you have more detail about the update and do you think it will be compatible with Mono the open source .NET framework?

Regards,
Hendrix

donovan

unread,
Jul 22, 2015, 10:34:28 AM7/22/15
to openMicroanalysis
Hi Hendrix,
Yes, those are the files I left out deliberately.

I am using VB6 still, but hope to convert to .NET this year.  I haven't heard of mono (sounds like a disease!), but I will look into it.
john

donovan

unread,
Jul 22, 2015, 11:02:05 AM7/22/15
to openMicroanalysis
Hi Hendrix,
I just checked and found a few more source files missing.  I just updated the ZIP again so please delete and download again.

It also occurs to me that you should be able to get CalcZAF to compile in VB6, but you'll have to comment out the calls to code that call the routines that are not included.

Most of the functionality should be preserved however.  You won't have the Student's "t" calculation menu, the Update menu and the code to automatically unzip penepma zip (but this can be downloaded and installed from the free distribution).
john

donovan

unread,
Jul 22, 2015, 11:20:21 AM7/22/15
to openMicroanalysis
I should also mention that VB6 is much easier to install on XP, though I run it under Win 7 64 bit successfully.  VB6 is free if you are a MSDN member.
john
Reply all
Reply to author
Forward
0 new messages