Free PDK Documentation
Free PDK is an open sourced and independently created tool-chain for the Padauk 8-Bit Microcontrollers, created as an alternative to the proprietary and closed tools provided by the Taiwanese company itself.
This includes the EasyPDKProg µC programmer hardware, adding support for the Padauk µCs to the SDCC C-Compiler, as well as comprehensive documentation of the instruction set architecture, and code examples.
The main focus is on supporting µCs of two Padauk series:
- M series OTP (OTP = one time programmable)
- F series MTP (MTP = multiple time programmable)
Padauk µCs are extremely inexpensive, priced as low as $0.03/pc in volumes of 100, which is why they generated a lot of interest after being featured by Dave from the EEVblog (first video and a bunch of follow-up videos). Despite the low price, it was found that the Padauk µCs sport an interesting architecture that can be a seen as a significant and meaningful extension of the Microchip PIC architecture. There is an extensive and active discussion on the EEVblog forum for this project and further discussion here on µC.net (German).
This page provides an overview of the different sub-projects created in the free-pdk GitHub organization. It also provides custom pinout diagrams for some of the Padauk µCs.
Easy PDK Programmer
Padauk µCs are programmed via a proprietary high-voltage protocol. The protocol was reverse engineered and a fully open source programmer that already supports almost two dozen Padauk µCs has been created. All sources for the programmer are available at:
SDCC-based Open Source Tool-Chain
Padauk’s own tool-chain is based on a custom programming language called “Mini-C” with a syntax based on the C-language. This language is only supported by their own tool-chain, including IDE (“Padauk Developer Studio”) and programmer (“Writer”). The tool-chain also uses a custom binary format with encryption/obfuscation. Should you be interested in code samples in that custom language, take a look at free-pdk/fppa-code-examples.
The open source tool-chain is based on the Small Device C-Compiler (SDCC) and therefore does support Standard C and common binary output formats (intel hex and bin), including those used by the Easy PDK Programmer.
Please note that right now there is no interchangeability between both tool-chains. Binaries generated by SDCC cannot be written by the official Padauk programmer, but only by the Easy PDK Programmer.
Padauk µCs use different kinds of instruction sets: 13, 14, 15, or 16 bit (more information on these instruction sets can be found below). Support for the 14 and 15 bit Padauk instruction sets has been added to SDCC, a C compiler for small devices. Support for the 13 bit Padauk instruction set is being worked on.
Helpful SDCC resources:
- Documentation
- Open bugs in the Padauk integration
- Feature Requests related to the Padauk integration
Installing SDCC
The latest binaries of SDCC can be obtained on the SDCC website. Please note that the version that comes with your operating system’s package manager is likely outdated and may not have support or only limited support for the Padauk µCs.
µC-specific Information and Pinouts
Note: Other µCs than the µCs listed here may be supported. If you want to learn more about the naming scheme, read more here.
MTP (Flash) Variants
| MCU | OSS Status | Arch. | max IO | ROM | RAM | Timers | PWM | CMP | ADC | Special | Padauk Links |
|---|---|---|---|---|---|---|---|---|---|---|---|
| PFS154 | Supported | PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit 3x 11‑Bit |
1 | ‑ | LCD |
Product Page
Datasheet |
| PFS172 | Supported | PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit | 1 | 8‑Bit |
Product Page
Datasheet |
|
| PFS173 | Supported | PDK15 | 18 |
3 KW |
256 | T16 T2 T3 |
2x 8‑Bit 3x 11‑Bit |
1 | 8‑Bit | LCD |
Product Page
Datasheet |
OTP Variants
| MCU | OSS Status | Arch. | max IO | ROM | RAM | Timers | PWM | CMP | ADC | Special | Padauk Links |
|---|---|---|---|---|---|---|---|---|---|---|---|
| PMS150C | Supported | PDK13 | 6 |
1 KW |
64 | T16 T2 |
1x 8‑Bit | 1 | ‑ | - |
Product Page
Datasheet |
| PMS15A | Supported | PDK13 | 6 |
0.5 KW |
64 | T16 T2 |
1x 8‑Bit | 1 | ‑ | - |
Product Page
Datasheet |
| PMS152 | Supported | PDK14 | 14 |
1.25 KW |
80 | T16 T2 |
1x 8‑Bit 3x 11‑Bit |
1 | ‑ | - |
Product Page
Datasheet |
| PMS154C | Supported | PDK14 | 14 |
2 KW |
128 | T16 T2 T3 |
2x 8‑Bit 3x 11‑Bit |
1 | ‑ | LCD |
Product Page
Datasheet |
| PMS171B | Supported | PDK14 | 14 |
1.5 KW |
96 | T16 T2 T3 |
2x 8‑Bit | 1 | 8‑Bit | - |
Product Page
Datasheet |
Evaluation Boards
These are evaluation boards for the online-programmable MTP (as opposed to the OTP parts, which can only be programmed offline and once) Padauk µC. free-pdk/f-eval-boards.
Instruction Sets, Opcodes, and Programming Sequence
The different Padauk µCs use either 13, 14, 15, or 16 bit instruction sets. The following files provide an overview over the different instruction sets.
More information, including information on the programming sequence, can be found at free-pdk/fppa-pdk-documentation
Other Tools
- Circuit Symbols for gEDA gschem: A collection of circuit symbols for many of the Padauk µCs. free-pdk/pdk-gschem-symbols.
- Padauk µC Emulator written in VHDL: This project aims to provide a fully functional, timing accurate VHDL model for simulating PADAUK FPPA microcontrollers. free-pdk/fppa-pdk-emulator-vhdl
- A bunch more tools are located at
free-pdk/fppa-pdk-tools.
- Disassembler: dispdk supports 13 bit, 14 bit, 15 bit and 16 bit opcodes
- Emulator: emupdk supports 14 bit opcodes, no peripheral support yet requires mapping of processor ID in emucpu.c
- PDK converter: depdk convert/deobfuscate any PDK file to binary
Projects from the Community
These projects are auto-populated once per day by
searching GitHub for repositories with the padauk
tag.
Latest Activity
The latest activity in the free-pdk
GitHub organization is fetched at least once per day and displayed below.
@cpldcpu commented on issue
free-pdk/free-pdk.github.io#38
Sorry for hickup with merges
That's a good idea, indeed. I am still quite confused how this happened. It seems like the head was merged into a minor change of mine after rebasing everything to the state of my repository.
@cmfcmf commented on issue
free-pdk/free-pdk.github.io#38
Sorry for hickup with merges
You are probably looking for this: https://code.visualstudio.com/updates/v1_28#_always-rebase-when-running-sync
-
5d590e9
Revert "Revert "Merge branch 'production' of https://github.com/free-pdk/free-pdk.github.io into production""
This reverts commit bfeefd9d65e604f0e9d764b7fb6a4f634f821dd7.
-
bfeefd9
Revert "Merge branch 'production' of https://github.com/free-pdk/free-pdk.github.io into production"
This reverts commit d340ca1ec6b8140a990e964aae37da9c7b277cc0, reversing
changes made to 60d9e66bde121bbc65cab723fc9ff4149b39091b.
@serisman commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
Copyright and LICENSE information was merged via pull request #3
- 7f66037 Create LICENSE
- 4500fd1 Add Copyright and LICENSE information
- f55fef2 Update README.md
- 4b4d00a Sync with master
- e7e040b Merge branch 'master' into feature/add-license
- c4fe878 Merge branch 'master' into feature/add-license
-
3ccaf89
Merge pull request #3 from free-pdk/feature/add-license
Add Copyright and LICENSE information
@serisman commented on issue
free-pdk/pdk-includes#5
Add LICENSE
Copyright and LICENSE information was merged via Pull Request #7
@Bingo600 commented on issue
free-pdk/easy-pdk-programmer-software#45
Include git rev/branch in version output
@JS
Beautifull
$ easypdkprog -V
easypdkprog 1.3-10-gc5fabd3
$ easypdkprog probe --verbose
Searching programmer... found: /dev/ttyACM3
FREE-PDK EASY PROG - HW:1.2 SW:1.3 PROTO:1.3 (1.3-10-gc5fabd3)
Probing IC... found.
TYPE:FLASH RSP:0x1AA1 VPP=4.50 VDD=2.00
IC is supported: PFS154 ICID:0xAA1
I would say this one can be closed with success - elegant
Who does that ??
@spth commented on issue
free-pdk/pdk-includes#5
Add LICENSE
For more details on a GPL+LE, see e.g.:
https://www.gnu.org/licenses/gcc-exception-3.1.en.html
@serisman commented on issue
free-pdk/free-pdk-examples#4
Remove the notes about using development version of Easy PDK Programmer
Fixed via commit: https://github.com/free-pdk/free-pdk-examples/commit/227fc3df1192feafe60918283b111f07c6329d30
@serisman commented on issue
free-pdk/pdk-includes#5
Add LICENSE
Ok, here is a different PR with GPL v2 with Linking Exception: https://github.com/free-pdk/pdk-includes/pull/7
@serisman commented on pull request
free-pdk/pdk-includes#7
Add Copyright and LICENSE information
@freepdk - Please review and indicate your acceptance of the Copyright and License for this repo.
@serisman commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
Ok, here is a different PR with GPL v2 with Linking Exception: https://github.com/free-pdk/easy-pdk-includes/pull/3
@serisman commented on pull request
free-pdk/easy-pdk-includes#3
Add Copyright and LICENSE information
@freepdk - Please review and indicate your acceptance of the Copyright and License for this repo.
- c5fabd3 fix undefined case for firmware version
@freepdk commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
> > I'm not sure if the old LGPL is the right choice for headers which are included in a linked program.
> > I think GPL + LinkException is a better choice for this.
>
> Do you have a link that shows that as being a real thing?
>
> I couldn't find it on http://www.gnu.org/licenses, and it isn't directly listed on their exceptions page either: https://www.gnu.org/licenses/exceptions.html
>
> GitHub doesn't know about it: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository
>
> SPDX doesn't directly list it (unless it is one of the deprecated ones): https://spdx.org/licenses/
>
> Wikipedia isn't really all that clear, although they do list LGPL as being related: https://en.wikipedia.org/wiki/GPL_linking_exception
>
> Or, do we just list this as GPL 2.0 and include our own exception text (similar to what SDCC uses)? That feels a bit dirty to not use an 'official' license, but maybe it is ok?
But you use an official license. You just add an additional exception.
@freepdk commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
https://en.wikipedia.org/wiki/GPL_linking_exception
In SDCC I only found this:
https://sourceforge.net/p/sdcc/code/HEAD/tree/trunk/sdcc/doc/README.txt
https://sourceforge.net/p/sdcc/code/HEAD/tree/trunk/sdcc/COPYING
=> we need to ask @spth
Linking Excpetion:
You might put the repo under GPL LICENSE and then add a "LICENSE-ADDITIONAL" containing the linking exception.
@serisman commented on issue
free-pdk/pdk-includes#5
Add LICENSE
> SDCC suggested GPL + LinkExcpetion. LGPL is a bit different.
Yeah, I couldn't really find that as an 'official' license. Do you have a link that shows that as being a real thing?
I couldn't find it on http://www.gnu.org/licenses, and it isn't directly listed on their exceptions page either: https://www.gnu.org/licenses/exceptions.html
GitHub doesn't know about it: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository
SPDX doesn't directly list it (unless it is one of the deprecated ones): https://spdx.org/licenses/
Wikipedia isn't really all that clear, although they do list LGPL as being related: https://en.wikipedia.org/wiki/GPL_linking_exception
Or, do we just list this as GPL 2.0 and include our own exception text (similar to what SDCC uses)? That feels a bit dirty to not use an 'official' license, but maybe it is ok?
@serisman commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
> I'm not sure if the old LGPL is the right choice for headers which are included in a linked program.
>
> I think GPL + LinkException is a better choice for this.
Do you have a link that shows that as being a real thing?
I couldn't find it on http://www.gnu.org/licenses, and it isn't directly listed on their exceptions page either: https://www.gnu.org/licenses/exceptions.html
GitHub doesn't know about it: https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/licensing-a-repository
SPDX doesn't directly list it (unless it is one of the deprecated ones): https://spdx.org/licenses/
Wikipedia isn't really all that clear, although they do list LGPL as being related: https://en.wikipedia.org/wiki/GPL_linking_exception
@freepdk commented on issue
free-pdk/pdk-includes#5
Add LICENSE
SDCC suggested GPL + LinkExcpetion. LGPL is a bit different.
@freepdk commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
I'm not sure if the old LGPL is the right choice for headers which are included in a linked program.
I think GPL + LinkException is a better choice for this.
- 3680aec use newer dist for autobuild of firmware
@serisman commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
Pull Request adding Copyright and LICENSE information: https://github.com/free-pdk/easy-pdk-includes/pull/2
@serisman commented on pull request
free-pdk/easy-pdk-includes#2
Add Copyright and LICENSE information
@freepdk - Please review and indicate your acceptance of the Copyright and License for this repo.
@serisman commented on issue
free-pdk/pdk-includes#5
Add LICENSE
Pull Request to add Copyright and License information: https://github.com/free-pdk/pdk-includes/pull/6
@serisman commented on pull request
free-pdk/pdk-includes#6
Add Copyright and LICENSE information
@freepdk - Please review and indicate your acceptance of the Copyright and License for this repo.
- adb9b19 remove compiled firmware and add note where to find in future or to compile it
@freepdk commented on issue
free-pdk/easy-pdk-programmer-software#45
Include git rev/branch in version output
Firmware autobuild and git tag/version in programmer firmware is working now (see commit 6c348f81b5bd57d0a19a159316458de59c6f1421)
@kaweksl
> -v arg should print also firmware/protocol version if connected, also printing firmware branch could be useful.
> Currently firmware version is printed when issuing for example
> `easypdkprog --verbose probe`
> but that is not obvious
-V prints the version of the host program. It is not intended to connect somewhere (USB) and get version numbers of remote systems.
Maybe need to add extra command like "test" or "version" (instead of "--verbose probe") ?
- 6c348f8 add tag/version from git to programer firmware and use autobuild to create firmware
@freepdk commented on issue
free-pdk/free-pdk-examples#3
Still missing LICENSE
> It might be more important on the pdk-includes repo, because that is more likely to be needed by and included into other projects. I don't like forcing people to license their projects as GPL (or even sharing them back) just because they use the common device include files. But, as Philipp mentioned on one of the other repos, we may have to stick with GPL2+LE anyway in order to be considered for inclusion in SDCC. We can address this on that repo.
I fully agree to use the SDCC compatible license (GPL2+LE) for all of the header files which are supposed to be merged to SDCC.
@serisman commented on issue
free-pdk/easy-pdk-includes#1
Add LICENSE
> SDCC uses GPL2+LE (i.e, GPL 2 or later with liking exception) for its library.
> Whatever is chosen should be compatible with that, at least for the part that is supposed to go into SDCC later.
This repo is the programmer specific include files (i.e. calibration routines) and is not currently intended to be included with SDCC. But, your comment would apply to the pdk-includes repo: https://github.com/free-pdk/pdk-includes/issues/5
@serisman commented on issue
free-pdk/free-pdk-examples#3
Still missing LICENSE
Well, I am not particularly interested in (or qualified for) an extended discussion on this.
If you feel strongly that GPL is the way to go, I'm fine with that, and can keep my preferences to myself.
I don't see a big difference on a repo like this one anyway.
It might be more important on the pdk-includes repo, because that is more likely to be needed by and included into other projects. I don't like forcing people to license their projects as GPL (or even sharing them back) just because they use the common device include files. But, as Philipp mentioned on one of the other repos, we may have to stick with GPL2+LE anyway in order to be considered for inclusion in SDCC. We can address this on that repo.
@freepdk commented on issue
free-pdk/easy-pdk-programmer-software#45
Include git rev/branch in version output
@Bingo600
You don't have to use travis... Travis is used to automatically build the releases (compiled versions of the project):
https://github.com/free-pdk/easy-pdk-programmer-software/releases
Many people do not want to compile easypdkprog (especially Windows users) so the releases are a convenient way for them.
Your workflow - checkout master, compile yourself would indeed work without any problem. Just for the autobuild I need to add the firmware build.
This is not a hard task, it just needs some time. I also need to find a way not to install the arm tools and compile the firmware 3 times for the 3 releases Linux/MacOS/Windows.
@Bingo600 commented on issue
free-pdk/easy-pdk-programmer-software#45
Include git rev/branch in version output
I think this is "Over my head" ... As in i have never used travis
If you add a new version , i do a git pull , makes easypdkprog , and a new firmware on my local machine.
But that is not what you meant by the above , i'm sure.
/Bingo
@freepdk commented on issue
free-pdk/easy-pdk-programmer-software#45
Include git rev/branch in version output
@Bingo600
The problem is not adding it to the Makefile. The problem is to add the correct tag to the autobuild process.
Right now when you create a tag on master the travis autobuild uses this tag to include it into the release.
Since the firmware is not built with the autobuild right now there is no way to add the tag.
Example:
In future new master version is pushed and new tag 1.4 is added.
Then travis autobuild just compiles easypdkprog and creates the release
=> problem: firmware does not have new tag. Any previous (by hand) compiled firmware will have the old tag since the new tag is the trigger for autobuild.
=> solution: I need to add the firmware build to travis. this requires to add the arm build tools to the travis VM build process...
Have a look at ".travis.yml" and ".travis-build.sh".
And in case you did not have noticed there is a "build passed" badge on github. When you click on it you see the last autobuild: https://travis-ci.org/github/free-pdk/easy-pdk-programmer-software
and if you click on "Build History" there you see all autobuilds done: https://travis-ci.org/github/free-pdk/easy-pdk-programmer-software
@Bingo600 commented on issue
free-pdk/easy-pdk-programmer-software#45
Include git rev/branch in version output
Could this work ?
`$ cat fw-vers-patch
diff --git a/Firmware/source/Makefile b/Firmware/source/Makefile
index 89bfba2..329f97d 100644
--- a/Firmware/source/Makefile
+++ b/Firmware/source/Makefile
@@ -1,6 +1,8 @@
#GCC_PATH = ../../../../gcc-arm-none-eabi-9-2019-q4-major/bin
BUILD_DIR = build
+EPDKVER ?= $(shell git describe --dirty)
+
TARGET = EASYPDKPROG
# debug build?
@@ -125,7 +127,7 @@ endif
# compile gcc flags
ASFLAGS = $(MCU) $(AS_DEFS) $(AS_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
-CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -Wall -fdata-sections -ffunction-sections
+CFLAGS = $(MCU) $(C_DEFS) $(C_INCLUDES) $(OPT) -D__FPDKSW__=\"$(EPDKVER)\" -Wall -fdata-sections -ffunction-sections
ifeq ($(DEBUG), 1)
CFLAGS += -g -gdwarf-2
diff --git a/Firmware/source/Src/fpdk.h b/Firmware/source/Src/fpdk.h
index 4c2be8b..11af2b8 100644
--- a/Firmware/source/Src/fpdk.h
+++ b/Firmware/source/Src/fpdk.h
@@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#include <stdint.h>
-#define __FPDKSW__ "1.4"
+#ifndef __FPDKSW__
+#define __FPDKSW__ "unknown"
+#endif
#define __FPDKHW__ "1.2"
typedef enum FPDKHWVARIANT
`
@freepdk commented on issue
free-pdk/free-pdk-examples#3
Still missing LICENSE
> I can appreciate that you have put a LOT of your own time into the programmer (and supporting documentation, etc...), and don't want someone to just come in and sell everything you have come up with. That certainly makes sense for something like the programmer, but does that really matter for some example code (and include files)?
You are completely wrong here. I have nothing against anything from the project is sold.
GPL also does not forbid this.
The only thing required from GPL, is to include the full source of the original and all modifications.
What other "more permissive" you need / want to grant?
Why remove this simple restriction by choosing PD or MIT?
> > Why PD or MIT?
> > You want others to be able to use this work and build it into their closed source products?
> > [ ] yes
> > [ ] no
>
> Sure, why not?
>
> That is still increased exposure and can still lead to more potential users hunting down bugs and contributing enhancements.
I see it exact the other way. By choosing MIT or PD you might discourage several free opens source developers to contribute new features or bug fixes since there is no way fro them to protect their work from being included in close source products.
Almost 20 years ago, I had almost the same thinking and released anything under MIT. There was also no argument back then which could have convinced me to use GPL. I learned it the hard way that I was wrong.
So for me: sharing = caring, only GPL really ensures sharing.


 When I got a little older, I realized that it was the violins that were in tune.Eventually I read Helmholtz' Sensations of Tone and learned the physical basis of consonance and dissonance. By then I was working with computers and began to consider the possibly of building a keyboard instrument that I could play in tune, in the same sense that string quartets and a capella vocal groups are (or can be) in tune.
The software on this Web site, in combination with a MIDI keyboard, accomplishes just that.
The software is written in Java and uses the Java sound extension (javax.sound.midi). It consists of a single package named intune. It works under Java 1.5 and might work with Java 1.2 (apparently the Java sound extension was broken under 1.3 and 1.4).
You can use the software in two different ways. The first way allows you to give a performance in just intonation in real time. (For more information about just intonation, there is an entire society, The Just Intonation Network, devoted to it.) It requires an auxiliary MIDI device, in addition to the keyboard, through which you indicate modulations.
The auxiliary controller requires 13 actuators. A 13-note foot pedal would be ideal; I'm using an extra MIDI keyboard rigged up with key-extenders to make 13 of its keys usable as foot pedals. The 13th actuator is used to indicate the "subdominant" tuning of the second degree of the scale. If the tonic has frequency 1, the second may have either frequency 9/8 (which sounds right with the dominant) or 10/9 (which sounds right with the subdominant). In the case of a dominant 7th or 9th chord, the 9/8 ratio sounds best.
To use the software in the second way, start the PlayTuned program using the temperament of your choice and select the -save option to capture the performance to a disk file. Then use the Editor program on the saved file to insert modulation and subdominant directives. Using the software this way requires no auxiliary MIDI device, just the keyboard.
You can play the edited file with the Playback program. You can play it as it was edited or choose to ignore the tuning directives and apply a temperament during playback.
Two temperaments are included with this version, equal temperament and a temperament devised by Thomas Young in 1799.
A couple of snippets of performances captured with PlayTuned and edited with the Editor are included as examples.
In its present form, the software is somewhere between alpha and beta. It works dependably, but I need to clean up the code to make it easier to read. Also, I need to make a better interface to the auxiliary device, so that it will be easy to slip in foot pedals or whatever, and a better interface to temperaments, to make them even easier to create.
Description of the examples page
User documentation for the programs:
PlayTuned
Replay
Playback
Editor
New in this version:
- the ability to capture a performance to disk and replay it (using the -save option of PlayTuned and the Replay program)
- an Editor that allows you to insert tuning directives after the music is captured
- a Playback program that allows you to play the output of the Editor
- support for temperaments
- an expanded timbre option (-t) that allows you to select from multiple MIDI patch banks and an option (-synth) that allows you to select the MIDI output device (useful if you have a hardware synthesizer)
- programs Tun2Mid and Mid2Tun to convert from .tun to MIDI format and MIDI to .tun format
If you're willing to use the Editor to insert the tuning directives after the fact, you can forget about the foot pedals. Just play a piece using PlayTuned in the temperament of your choice with the -save option on, then edit the saved file to insert the directives. Two temperaments are included, equal temperament and a "well temperament" devised by Thomas Young in 1799.The Playback program allows you to play with the tuning indicated in the file you are playing or specify a different tuning on the command line. Using Playback, you can compare different tunings applied to the same performance.
The Sarabande from Bach's English Suite #6 in d minor is interesting because of its many modulations. They are undoubtedly related to the highly dramatic character of the music.
The score for the first few measures of the Sarabande is shown below, with markings indicating the tuning changes (modulations).
Try the following to compare the different sounds:
java intune.Playback sarabande.tun equal java intune.Playback sarabande.tun intune.ThomasYoung1799 java intune.Playback sarabande.tun diatonic d
This will play the excerpt first in equal temperament, then in the Thomas Young temperament, then in just intonation. I used MIDI patch number 6 when I edited the excerpt (and when I captured it with PlayTuned), so it will use timbre number 6 unless you override it with the -t option. MIDI patch number 6 (or 7 if you start numbering from one instead of zero) is used for a harpsichord sound according to the General MIDI standard.The above commands use the default synthesizer as the MIDI output device, typically a software synthesizer. If you have a sound board with a hardware synthesizer, you will probably get a better sound by selecting it as the output device (using the -synth option).  (To simulate an instrument with multiple manuals would require using more than one timbre, a feature not supported in this version.)
To be specific, the example was captured with the command
java intune.PlayTuned intune.ThomasYoung1799 -synth 6 -t 6 -save sarabande.sav
and edited with the commandjava intune.Editor sarabande.sav sarabande.tun dia d -synth 6 -t 6
since my hardware synthesizer is MIDI device 6.The second example an excerpt from the first Prelude in the Well Tempered Clavier by J. S. Bach.
(I haven't played in over ten years, so please make allowances for the performances.)
PlayTuned:
Allows you to perform in real time through a MIDI keyboard. If you use an auxiliary MIDI device (such as foot pedals), you can achieve just intonation, or you can choose to play using a temperament and capture the performance for later editing with the Editor program.
Invoke asjava intune.PlayTuned tuning [ note ] optionswhere tuning and note are as shown here.
The options are
-kb kbIndex MIDI device number for the keyboard (default 0)
-aux auxIndex MIDI device number for the auxiliary MIDI device, if used (default 1)
-t timbre MIDI bank number * 256 + patch number (default 0)
-synth synthIndex MIDI device number for the MIDI output device (if this option is absent, the program uses the default javax.sound.midi Synthesizer device, probably a software synthesizer)
-save filename saves the performance to the named file
Note that the MIDI output device need not be a Synthesizer in the Java sense, just a MidiDevice. If you default to a software synthesizer, it will probably have too slow a response to be usable. (It'll be like trying to talk while listening to your own voice with a delay.) You may terminate the PlayTuned program by entering 'q' or 'Q' on the computer keyboard (followed by the Enter key if necessary).
Replay:
Allows you to replay a performance captured with PlayTuned.
java intune.Replay filename optionswhere filename is the name of a file captured with the -save option of PlayTuned.The options are:
-t timbre MIDI bank number * 256 + patch number (default 0) (if this option is absent, the program uses the timbre from the Editor run that created the file)
-synth synthIndex MIDI device number for the MIDI output device (if this option is absent, the program uses the default javax.sound.midi Synthesizer device, probably a software synthesizer)
You may terminate the Replay program by entering 'q' or 'Q' on the computer keyboard (followed by the Enter key if necessary).
Playback:
Allows you to play back a file created with the Editor or captured with PlayTuned.
java intune.Playback filename [ tuning [ note ] ] optionswhere filename is the name of a file output by the Editor program or captured with the PlayTuned program, and tuning and note are as shown here.As the notation indicates above, the tuning argument is optional. If it is not specified, the program uses the tuning used in the Editor run that created the file.
The options are:
-t timbre MIDI bank number * 256 + patch number (default 0) (if this option is absent, the program uses the timbre from the Editor run that created the file)
-synth synthIndex MIDI device number for the MIDI output device (if this option is absent, the program uses the default javax.sound.midi Synthesizer device, probably a software synthesizer)
You may terminate the Playback program by entering 'q' or 'Q' on the computer keyboard (followed by the Enter key if necessary).
Editor:
Allows you to insert timing requests (modulations and subdominant directives) in a file captured using PlayTuned.
java intune.Editor infile outfile [ tuning [ note ] ] optionswhere infile is the name of the input file, a file produced by the Editor or by PlayTuned, outfile is the name of the output file, and tuning and note are as shown here.As the notation indicates above, the tuning argument is optional. If it is not specified, the program uses the tuning from the Editor run that created the file.
The options are:
-t timbre MIDI bank number * 256 + patch number (default 0) (if this option is absent, the program uses the timbre from the Editor run that created the file)
-synth synthIndex MIDI device number for the MIDI output device (if this option is absent, the program uses the default javax.sound.midi Synthesizer device, probably a software synthesizer)
The Editor regards the file being edited as a sequence of items that may be MIDI messages or tuning requests. Every item in the file has a time associated with it, and the item times are non-decreasing as you progress through the file. When the Editor is not playing (using the file items to generate sound), it displays the item at the current file position and a few items before and after it. The item at the current position is marked with asterisks.The Editor responds to the following keyboard commands, which may be abbreviated by their initial letters when the commands begin with an alphabetic character. It is always necessary to hit the Enter key to enter a command. Integral values are represented by mmm, nnn or ppp and floating point values by xxx. Optional fields are enclosed in square brackets and different possible values of a field are separated by a vertical bar (thus [ + | - ] means that either a plus sign or a minus sign may be entered). N represents a note, which may be any letter a through g possibly followed by a # or -:
('a'|'b'|'c'|'d'|'e'|'f'|'g'|'A'|'B'|'C'|'D'|'E'|'F'|'G')['#'|'-']The lower case letters represent minor keys and the upper case major keys (although there is no distinction between major and minor as far as the computed intonations are concerned). The pound sign stands for a sharp and the minus sign for a flat.The commands are:
next previous delete insert modulate subdominant tempo go halt write ? [ + | - ] nnn quitThe following paragraphs give the format of these commands and explain their effect:
next [ nnn ]advances the given number of items in the file (default 1) or goes to end of file if there are not that many items left
previous [ nnn ]steps back the given number of items in the file (default 1) or goes to beginning of file if there are not that many items preceding the current item
delete deletes the item at the current position in the file
insert mmm nnn [ ppp ]where mmm is the time in nanoseconds at which the item should be inserted, nnn is the MIDI note number and ppp is the MIDI note velocity. If ppp is present, a MIDI Note On message is inserted, and if it is omitted, a MIDI Note Off message is inserted. The new file position is at the inserted item. The file begins at time zero. (If you insert a Note On, be sure to insert a Note Off at some time following it.)
modulate [ N ]inserts a modulation to key N before the current position in the file (and leaves the current position unchanged)
subdominant [ on | off ]inserts a subdominant directive before the current position in the file (and leaves the current position unchanged). "on" means turns subdominant tuning on and "off" means turn subdominant tuning off. (If you insert a directive to turn subdominant tuning on, be sure to insert a directive to turn it off at some position farther along in the file.)
tempo xxxchanges the tempo at which playback is done. It may be convenient to slow down the playback to make it easier to insert modeulations and subdominant directives where you want them.  The effects are linear: 2.0 doubles the tempo and 0.5 halves it. (If you choose a tempo much above 1, the results may sound pretty ragged.)
go starts playback (sound production) from the current position.
halt stops sound production.
write [ filename ]writes the file in its current edited state to disk. If the command contains a file name, it is used as the name of the output file; otherwise, the file is written to the output file given on the Java command line
? reports the current position in the file (current item number and the time associated with it).
[ + | - ] xxxrepositions the file to time xxx if there is no leading plus or minus sign and repositions the file to the current time plus or minus xxx otherwise. The new position is at the first item with time at least as great as the specified time. If the specified time is greater than the time associated with any item in the file, the new position is at end of file.
quit quits the run. Also writes the file to the output file specified on the command line used to start the run.
Below is the score for one of the examples included with this package. The bold-face letters beneath the bass staff indicate modulations inserted with the Editor.
The tuning and note command line arguments:tuning may be diatonic, equaltemperament, pythagorean or the name of a temperament class. The only temperament class provided with this version is intune.ThomasYoung1799. diatonic specifies just intonation, equaltemperament is just what it sounds like, and pythagorean specifies circle-of-fifths tuning. note is required only if diatonic or pythagorean tuning is specified. For diatonic tuning it gives the starting key and for pythagorean tuning it specifies the tonic note of the mode. In all cases, A above middle C has frequency 440 Hz. Any prefix sufficient to distinguish among the three built-in tunings (diatonic, equalteperament and pythagorean) will suffice (i.e., a single letter or more), but the full name of a temperament class is required. note may be any letter a though g possibly followed by # or -:
('a'|'b'|'c'|'d'|'e'|'f'|'g'|'A'|'B'|'C'|'D'|'E'|'F'|'G')['#'|'-']where the pound sign stands for a sharp minus sign stands for a flat. The lower case letters stand for minor keys and the upper case letters for major keys. For the sake of computing the tunings, it doesn't matter whether you use upper or lower case, since the same tunings are computed whether the key is major or minor.


push is working
Home
This Webpage consist of Earthquake records
Upload CSV
Retrive earthquake Details
Magnitude
Range
Location
Clustering of data
Day or Night


Hi, I am SnowballSH, a programmer and music producer.
I am active on my Github account and my YouTube channel :) Feel free to check them out!
I made this site in 2 hours using HTML and Javascript with Bootstrap. You can find the source code here.


Swiss Federal Institute of Technology (ETH Zürich)
M.Sc., Computer Science, 2016 - 2018
Thesis: Non Convex-Concave Saddle Point Optimization, Grade: 6.0.
GPA: 5.71/6
Karlsruhe Institute of Technology
B.Sc., Electrical Engineering and Information Technology, 2013-2016
Thesis: Identifying muscle pre-contraction to control an exoskeleton.
Grade: 1.0 (excellent)


Extract short descriptions for all blocks that didn't set them explicitly. The principle is that everything before the first dot end up as short description if shortdesc was empty at this point.


Tokyo
Capital of Japan
Tokyo, the bustling capital of Japan, combines ultramodern style with traditional, from neon-lit skyscrapers to historic temples. The opulent Shinto shrine Meiji is known for its towering gate and the surrounding forests. The Imperial Palace is located amidst public gardens. The city's many museums offer exhibits ranging from classical art (at the National Museum of Tokyo) to a reconstructed kabuki theater (at the Edo-Tokyo Museum). More
The ancient narrow streets of the Asakusa district have shops, kimono women and the 7th-century Sensō-ji Buddhist temple. Roppongi has bustling nightclubs and karaoke bars, while Akihabara houses state-of-the-art electronics stores. Cozy Japanese-style pubs, called izakaya, are scattered throughout the city. The Tsukiji fish market, with a famous tuna auction, is close to the center. The Tokyo Skytree Tower offers panoramic views of the city from its public observation deck. Tokyo is famous for its vibrant gastronomic scene, and the Shibuya and Harajuku districts are at the core of a modern young fashion culture.
Things to do
Odaiba
Skytree
Kokyo
Sensō-ji


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/have.20vs.20assume.html ---
What is the difference between have and assume?
have
states an assertion that you want to prove. assume
is something you use when you're trying to prove p -> q
: you do assume h : p, show q, ...
thanks
:+1:
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Construction Estimator
Project Details
Project Name:
Human Hours Needed:
Desired End Date:
Worker Details
Work hours per day:
How many humans?
Calculate


The complete RESTful API for EDDB
Currently EDDB is the greatest treasure of information of the galaxy and it is a user
friendly tool for many pilots. But it lacks an API for developers. Elite BGS is an attempt to fill this gap by providing
an API for EDDB data sources.
API
Access
Consumers must make a GET request at any endpoint.
Endpoints
Factions
https://eddbapi.kodeblox.com/api/v4/factions?<params>
Populated Systems
https://eddbapi.kodeblox.com/api/v4/populatedsystems?<params>
Stations
https://eddbapi.kodeblox.com/api/v4/stations?<params>
Systems
https://eddbapi.kodeblox.com/api/v4/systems?<params>
*Please note that the endpoints have been changed to their own subdomain.


Temperature response functions
t_response_arrhenius(T_leaf, Ea) t_response_arrhenius_kruse(dEa, Ea_ref, Par_ref, T2) t_response_arrhenius_medlyn(T_leaf, Ea, Hd, dS) t_response_arrhenius_topt(T_leaf, Ea, Hd, Topt) t_response_calc_dS(Ea, Hd, Topt) t_response_calc_topt(Hd, dS, Ea) t_response_heskel(T_leaf, a, b, c) t_response_mmrt(dCp, dG, dH, T_leaf)
| T_leaf | Leaf temperature in K |
|---|---|
| Ea | Activation energy in J mol-1 (Medlyn et al. 2002) |
| dEa | Temperature-dependent change in Ea in K^2 (Kruse et al. 2008) |
| Ea_ref | Activation energy in J mol-1 (Kruse et al. 2008) |
| Par_ref | Parameter at reference temperature of 25 Celsius (Kruse et al. 2008) |
| T2 | Leaf temperature term (Kruse et al. 2008) |
| Hd | Deactivation energy in J mol-1 (Medlyn et al. 2002) |
| dS | Entropy parameter in J mol-1 (Medlyn et al. 2002) |
| Topt | Optimum temperature of the process in K (Medlyn et al. 2002) |
| a | Constant to minimize residuals (Heskel et al. 2016) |
| b | Linear coefficient to minimize residuals (Heskel et al. 2016) |
| c | Quadratic coefficient to minimize residuals (Heskel et al. 2016) |
| dCp | Change in heat capacity of the enzyme between the enzyme-substrate #' and enzyme-transition states in J mol-1 K-1 (Hobbs et al. 2013) |
| dG | Change in Gibbs free energy of the reaction at 25 C in J mol-1 (Hobbs et al. 2013) |
| dH | Change in enthalpy of the reaction at 25 C in J mol-1 (Hobbs et al. 2013) |
t_response_arrhenius calculates the rate of a process based on an Arrhenius-type curve
t_response_arrhenius_kruse fits a peaked Arrhenius response according to Kruse et al. 2008.
t_response_arrhenius_medlyn is a peaked Arrhenius response as found in Medlyn et al. 2002.
t_response_arrhenius_topt is a peaked Arrhenius temperature response function.
t_response_calc_dS calculates dS from the fitted Topt model.
t_response_calc_topt calculates Topt for a process from Arrhenius parameters.
t_response_heskel is a quadratic temperature response according to Heskel et al. 2016.
t_response_mmrt is a macromolecular rate theory temperature response according to Hobbs et al. 2013.
Arrhenius S. 1915. Quantitative laws in biological chemistry. Bell.
Heskel et al. 2016. Convergence in the temperature response of leaf respiration across biomes and plant functional types. PNAS 113:3832-3837
Hobbs et al. 2013. Change in heat capacity for enzyme catalysis determines temperature dependence of enzyme catalyzed rates. ACS Chemical Biology 8:2388-2393
Kruse J, Adams MA. 2008. Three parameters comprehensively describe the temperature response of respiratory oxygen reduction. Plant Cell Environ 31:954-967
Medlyn BE, Dreyer E, Ellsworth D, Forstreuter M, Harley PC, Kirschbaum MUF, Le Roux X, Montpied P, Strassemeyer J, Walcroft A, Wang K, Loutstau D. 2002. Temperature response of parameters of a biochemically based model of photosynthesis. II. A review of experimental data. Plant Cell Environ 25:1167-1179


Back
Update user
Current password:
New password:
Confirm the password:
Location:
Date of birth:
Update


ADAndor¶
| author: | Matthew Pearson, Oak Ridge National Laboratory and Mark Rivers, University of Chicago |
|---|
Contents
Introduction¶
This is an areaDetector driver for CCD detectors from Andor Technology using Version 2 of the Andor Software Development Kit (SDK). It has been tested on the Andor iKon and DU401 CCD cameras with USB interface, but should work with other cameras as well. The driver is supported on 32-bit and 64- bit Linux and 32-bit and 64-bit Windows.
The driver currently provides access to most of the features of the Andor cameras:
- All Andor acquisition modes (Single Scan, Accumulate, Kinetics, Run Till Abort, and Fast Kinetics
- Control of the exposure time, accumulate cycle time, and kinetic cycle time
- Support for all of the Andor trigger modes
- Support for all of the Andor shutter modes
- Support for reading the detectors with 16-bit or 32-bit depth
- Saving files using the Andor SDK and/or with the standard areaDetector plugins
- Change the ADC sampling speed (0.05MHz and 2.5MHz on the iKon) and the Vertical Shift Period
- Set a region of interest (a smaller region can be read out faster)
- Set and monitor the CCD temperature
- Electron Multiplying (EM) Gain on supported detectors
- Support for selecting between Full Vertical Binning (FVB) and Image readout modes
- Support for Frame Transfer mode
The Andor module includes a separate driver to control the Andor Shamrock spectrographs. If the detector data is saved in the Princeton Instruments SPE file format using the Andor driver then it will include the Shamrock wavelength calibration information. No other file formats support saving the calibration.
This driver inherits from ADDriver It implements many of the parameters in asynNDArrayDriver.h and in ADArrayDriver.h. It also implements a number of parameters that are specific to the Andor detectors. The Andor class documentation describes this class in detail.
This document does not attempt to explain the meaning of the Andor-specific parameters. The Andor Software Development Kit documentation provides this detailed information. Andor does not allow me to redistribute the SDK documentation as part of areaDetector. It must be obtained from Andor’s Web site.
areaDetector includes the header and library files required to build the andor driver on any Linux or Windows computer. However, it does not include the shareable libraries, DLLs or drivers to actually run a detector. Those must be obtained from Andor, either by purchasing their SDK or their Solis application software. On Windows the path to the directory containing the Andor DLLs from the SDK or Solis must be added to the PATH environment variable when running the areaDetector IOC. On Linux the path to the directory containing the Andor shareable libraries from the SDK must be added to the LD_LIBRARY_PATH environment variable when running the areaDetector IOC.
NOTE: When using the Shamrock spectrograph on Windows the following DLLs must actually be copied from the SDK directory to the current working directory from which the IOC application is being run, e.g. iocBoot/iocAndor.
- atmcd32d.dll
- ShamrockCIF.dll
- atshamrock.dll
This is a rather strange requirement of the Andor Shamrock SDK, which will hopefully be fixed by them in a future release.
Note
When using SDK version >= 2.102.30000.0 on Linux one must make sure that libUSBI2C-[ARCH].so.[VERSION] is installed as part of support into libUSBI2C.so and libUSBI2C.so.2.
Also libd2xx_table.so might be needed to get Shamrock communicating. See andorSupport/ftdi_table.c for more.
Compile with:
$ gcc -fpic -shared -Wl,-soname,libd2xx_table.so -o libd2xx_table.so ftdi_table.c
Place the libd2xx_table.so into the folder with the rest of SDK support libraries.
Implementation of standard driver parameters¶
The following table describes how the Andor driver implements some of the standard driver parameters.
| Implementation of Parameters in asynNDArrayDriver.h and ADDriver.h, and EPICS Record Definitions in ADBase.template and NDFile.template | ||
|---|---|---|
| Parameter index variable | EPICS record name | Description |
| ADTriggerMode | $(P)$(R)TriggerMode, $(P)$(R)TriggerMode_RBV | Sets the trigger mode for the detector. Options are:
|
| ADImageMode | $(P)$(R)ImageMode, $(P)$(R)ImageMode_RBV | Sets the image mode for the detector. Options are:
The relation of ImageMode to the Andor acquisition modes are given in the table below. |
| ADNumExposures | $(P)$(R)NumExposures, $(P)$(R)NumExposures_RBV | Sets the number of accumulations (performed in software in Andor’s driver) in Single and Multiple modes |
| ADNumImages | $(P)$(R)NumImages, $(P)$(R)NumImages_RBV | Sets the number of images to take in multiple (Kinetics Series) mode |
| ADAcquirePeriod | $(P)$(R)AcquirePeriod, $(P)$(R)AcquirePeriod_RBV | Sets the time between images in Multiple (Kinetics Series) and Continuous (Run Till Abort) modes |
| ADGain | $(P)$(R)Gain, $(P)$(R)Gain_RBV | Sets the pre-amp gain of the detector. For the Andor driver the Gain is treated as an integer index into the supported gain table of the specific detector. The list of supported gains for the detector gain be found by typing “asynReport 1,ANDOR” at the IOC prompt. For example, on the iKon-M the relationship is:
|
| NDDataType | $(P)$(R)DataType, $(P)$(R)DataType_RBV | Sets data type for reading out the detector. Allowed values are:
UInt16 can be used when reading out a 16-bit detector with NumExposures=1, (i.e. without accumulations), or when one can be sure that multiple accumulations will not overflow 16 bits. UInt32 should be used for 32-bit detectors or when multiple accumulations could cause 16-bit overflow. |
| ADTemperature | $(P)$(R)Temperature, $(P)$(R)Temperature_RBV | Sets the setpoint temperature of the CCD (-120C to 20C) |
| ADTemperatureActual | $(P)$(R)TemperatureActual | Reads the actual temperature of the CCD |
| NDFileFormat | $(P)$(R)FileFormat, $(P)$(R)FileFormat_RBV | Selects the file format for saving files with the Andor driver. Choices are:
All of the file formats except SPE are written by the Andor SDK. The SPE file format is written directly by the driver. It uses version 3.0 of the SPE format, which includes XML metadata after the image data. Only the SPE format is able to save the wavelength calibration from the Shamrock spectrographs. |
The following table shows the relationship of ImageMode to the Andor acquisition modes, and the meaning of NumExposures and NumImages.
| Relationship of ImageMode to the Andor acquisition modes, and the meaning of NumExposures and NumImages. | ||||||
|---|---|---|---|---|---|---|
| ImageMode | NumExposures | AcquireTime | AndorAccumulatePeriod | NumImages | AcquirePeriod | Andor acquisition mode |
| Single | 1 | Sets exposure time | Not applicable | Not applicable | Not applicable | Single Scan |
| Single | >1 Sets number of accumulations per image. | Sets exposure time per accumulation | Sets accumulation period (cycle time) | Not applicable | Not applicable | Accumulate |
| Multiple | Sets number of accumulations per image | Sets exposure time per accumulation | Sets accumulation period if NumExposures > 1 | Sets number of images | Sets time between images (cycle time) | Kinetic Series |
| Continuous | Not applicable | Sets exposure time per image | Not applicable | Not applicable | Sets time between images (cycle time) | Run Till Abort |
| Fast Kinetics | Not applicable | Sets exposure time per sub-area | Not applicable | Controls number of sub-area exposures, each being followed by a vertical shift of SizeY. MinY controls the offset of the first row from the bottom of the CCD. SizeY controls the sub-area height. BinX and BinY control the horizontal and vertical binning. | Not applicable | Fast Kinetics |
Andor specific parameters¶
The Andor driver implements the following parameters in addition to those in asynNDArrayDriver.h and ADDriver.h.
| Parameter Definitions in andorCCD.h and EPICS Record Definitions in andorCCD.template | |||
|---|---|---|---|
| Description | drvInfo string | EPICS record name | EPICS record type |
| Turn the CCD cooler on and off | ANDOR_COOLER | AndorCooler, AndorCooler_RBV | bo, bi |
| Temperature status message. | ANDOR_TEMP_STAT | AndorTempStatus_RBV | waveform |
| Other status message. | ANDOR_MESSAGE | AndorMessage_RBV | waveform |
| Selects the Andor shutter mode. Choices are: Full Auto Always Open Always Closed Open for FVB Open for Any | ANDOR_SHUTTER_MODE | AndorShutterMode | mbbo |
| Selects the TTL polarity of an external shutter. Choices are: Low To Open High To Open | ANDOR_SHUTTER_EXTTL | AndorShutterExTTL | bo |
| Path and Filename of pallette file (used for TIFF and BMP file colours) (255 chars max). | ANDOR_PAL_FILE_PATH | PALFilePath | waveform |
Switch between the slow (low noise) ADC and the fast ADC. Choices are:
|
ANDOR_ADC_SPEED | AndorADCSpeed, AndorADCSpeed_RBV | mbbo, mbbi |
| Controls the period between accumulations when ImageMode=Single or Multiple and NumExposures>1. NOTE: Some Andor detectors (including the iKon) only support a single period when doing multiple accumulations in kinetic series mode. For these cameras ANDOR_ACCUMULATE_PERIOD has no effect, ACQUIRE_PERIOD determines the time between accumulations, and the time between images is 0, i.e. the next image starts as soon as the previous one is complete. | ANDOR_ACCUMULATE_PERIOD | AndorAccumulatePeriod, AndorAccumulatePeriod_RBV | ao, ai |
| Reads the actual value of AndorAccumulatePeriod, which may differ from the requested value due to timing limitations of the detector. | ANDOR_ACCUMULATE_PERIOD_ACTUAL | AndorAccumulatePeriodActual | ai |
| Reads the actual value of ADAcquireTime, which may differ from the requested value due to timing limitations of the detector. | ANDOR_ACQUIRE_TIME_ACTUAL | AndorAcquireTimeActual | ai |
| Reads the actual value of ADAcquirePeriod, which may differ from the requested value due to timing limitations of the detector. | ANDOR_ACQUIRE_PERIOD_ACTUAL | AndorAcquirePeriodActual | ai |
| Enable or disable the baseline clamp option. | ANDOR_BASELINE_CLAMP | AndorBaselineClamp, AndorBaselineClamp_RBV | bo, bi |
| Controls the Electron Multiplying (EM) Gain level on supported detectors. The valid range depends on the value of AndorEMGainMode and the detector temperature. For cameras that do not support EM Gain, AndorEMGain has no effect. | ANDOR_EM_GAIN | AndorEMGain, AndorEMGain_RBV | ao, ai |
Sets the EM Gain mode on supported detectors. Choices are:
For cameras that do not support EM Gain, AndorEMGainMode has no effect. |
ANDOR_EM_GAIN_MODE | AndorEMGainMode, AndorEMGainMode_RBV | mbbo, mbbi |
Enables access to higher EM Gain levels. Choices are:
For cameras that do not support EM Gain, AndorEMGainAdvanced has no effect. |
ANDOR_EM_GAIN_ADVANCED | AndorEMGainAdvanced, AndorEMGainAdvanced_RBV | bo, bi |
| Switch between the readout modes. Choices are: Full Vertical Binning (FVB) Image | ANDOR_READOUT_MODE | AndorReadOutMode, AndorReadOutMode_RBV | mbbo, mbbi |
Set Frame Transfer mode. Choices are:
Note: Only available on supported CCDs. |
ANDOR_FT_MODE | AndorFTMode, AndorFTMode_RBV | bo, bi |
Sets Vertical Shift Period, in units of microseconds per pixel shift. Choices are constructed at runtime. For example, the choices for an iDus are:
|
ANDOR_VS_PERIOD | AndorVSPeriod, AndorVSPeriod_RBV | mbbo, mbbi |
Unsupported standard driver parameters¶
ColorMode, ReverseX, and ReverseY are currently not supported.
Shamrock spectrograph control¶
The Andor module also includes a driver for the Andor Shamrock spectrographs. This driver allows control of the grating, central wavelength, and slit sizes.
| Parameter Definitions in shamrock.cpp and EPICS Record Definitions in shamrock.template | |||
|---|---|---|---|
| Description | drvInfo string | EPICS record name | EPICS record type |
| Selects the grating to use | SR_GRATING | Grating, Grating_RBV | mbbo, mbbi |
| Flag indicating if a grating is present | SR_GRATING_EXISTS | GratingExists[N], N=1-3 | bi |
| Selects the central wavelength | SR_WAVELENGTH | Wavelength, Wavelength_RBV | ao, ai |
| The minimum wavelength of the current configuration (ADDR=0) or the minimum wavelength of grating N (N=1-3) | SR_MIN_WAVELENGTH | MinWavelength, MinWavelength[N], N=1-3 | ai |
| The maximum wavelength of the current configuration or the maximum wavelength of grating N (N=1-3) | SR_MAX_WAVELENGTH | MaxWavelength, MaxWavelength[N], N=1-3 | ai |
| The size of slit N, N=1-4. The slits are numbered as follows: 1. Input slit side 2. Input slit direct 3. Output slit side 4. Output slit direct | SR_SLIT_SIZE | SlitSize[N], N=1-4, SlitSize[N]_RBV | ao, ai |
| Flag indicating if a slit is present | SR_SLIT_EXISTS | SlitExists[N], N=1-4 | bi |
| Array containing the wavelength calibration of each X pixel of the detector in nm. | SR_CALIBRATION | Calibration | bi |
Usage¶
Always use channel access put callback when setting parameters.
If any of the parameters set are out of range or fail in some way, then the PV will be put into alarm state. This should be checked after every PV set.
An example palette file for a TIFF file is GREY.PAL in the iocAndor directory.
Configuration¶
The Andor driver is created with the andorCCDConfig command, either from C/C++ or from the EPICS IOC shell.
int andorCCDConfig(const char *portName,
int maxBuffers, size_t maxMemory,
const char* installPath,
int priority, int stackSize)
The Shamrock driver is created with the shamrockConfig command, either from C/C++ or from the EPICS IOC shell.
int shamrockConfig(const char *portName,
int shamrockId, const char *iniPath,
int priority, int stackSize)
For details on the meaning of the parameters to this function refer to the detailed documentation on the andorCCDConfig function in the shamrock.cpp documentation and in the documentation for the constructor for the shamrock class.
Example st.cmd startup file¶
There an example IOC boot directory and startup script st.cmd provided with areaDetector.
MEDM screens¶
The following shows the MEDM screen that is used to control the Andor detector. Note that the general purpose screen ADBase.adl can be used, but it exposes a few controls that are not applicable to the Andor, and lacks some fields that are important for the Andor.
Andor.adl
is the main screen used to control the Andor driver.
The following shows the MEDM screen that is used to save files directly with the Andor detector.
The following shows the MEDM screen that is used to control the Shamrock spectrograph.
Restrictions¶
The following are known restrictions of the Andor driver. These should be fixed in a future release.
- No support for detector output signals (trigger and gate).
- Some Andor detectors (including the iKon) only support a single period when doing multiple accumulations in kinetic series mode. For these cameras ANDOR_ACCUMULATE_PERIOD has no effect, ACQUIRE_PERIOD determines the time between accumulations, and the time between images is 0, i.e. the next image starts as soon as the previous one is complete.
- Saving files using the Andor driver in Multiple and Continuous modes results in errors because the Andor SDK functions won’t save files if acquisition is in progress. Saving files in Single mode and Fast Kinetics mode works fine.
- Trigger modes have not been tested.
- The Shamrock wavelength calibration is only saved in SPE files. The Andor SDK file writers do not save the calibration, and it is not possible to pass the calibration to other file plugins as an attribute because array attributes are not currently supported in areaDetector.
- Single-Track, Multi-Track and Random-Track readout modes are not yet supported.


class BoundaryException : Any
| <init> |
BoundaryException(message: String = "") |
| assertWithinBounds |
fun assertWithinBounds(value: Double, boundary: Boundary): Unit
Make sure that the given value is between the upper and lower bounds, and throw an exception if they are not. |


The Healthy Care site provide tips and tutorial on how to take care of your body
A WHOLE NEW LOOK
BEAUTY PRONOUNCED
Start getting results you deserve!
Affordable, gorgeous and beauty which you deserve.
We all want to have a perfect body/skin and look beautiful, however in this world almost every week new products hit the market, and it is not always easy to find the right tips & skincare or makeup product that works for you.
Here you find the best tips and products to bring wellness into your lifestyle.


About Us
Honeygo Child Development Center is located in a residential neighborhood on two acres in Perry Hall, Maryland. On the site is the historic Jacob Seddon House, likely the oldest building in Perry Hall. Honeygo Child Development Center was founded in 1992 by Jim and Ramona Casserly. It began operation in 1994. It is the belief of Mr. & Mrs. Casserly that the best place for children to develop is in the home with a parent or grandparent. However, given the needs of modern life this is not always possible. Therefore, they have sought to provide the best possible alternative; a place where children are nurtured and feel safe that looks and feels like a family home. The Casserly’s are active owners thoroughly involved with the daily operation and are familiar with the children and their families so that they can support their individual need in a way that only a single center operation can do.


Interactive Scatter Plot Lattice with Vital Signs Data - A paneled series of scatter plots plotting every measure against every other measure


RAML version of the node
baseUri of owning Api concatenated with completeRelativeUri
Retrieve an ordered list of all absolute uri parameters. Returns a union of Api.allBaseUriParameters()
for Api
owning the Resource
and Resource.allUriParameters()
.
Append node as child
node to be appended
Append node as property value
node to be set as property value
name of property to set value for
Returns security schemes, resource or method is secured with. If no security schemes are set at resource or method level,
returns schemes defined with securedBy
at API level.
Retrieve an ordered list of all uri parameters including those which are not described in the uriParameters
node.
Consider a fragment of RAML specification:
/resource/{objectId}/{propertyId}:
uriParameters:
objectId:
Here propertyId
uri parameter is not described in the uriParameters
node,
Thus, it is not among Resource.uriParameters(), but it is among Resource.allUriParameters().
A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level.
Get child method by its name
Get child resource by its relative path
Path relative to API root
object representing class of the node
The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown.
An alternate, human-friendly name for the resource
YAML string representing the node
Array of errors
Instantiation of applyed traits
Actual name of instance interface
Methods that can be called on this resource
Whether the element is an optional sibling of trait or resource type
For siblings of traits or resource types returns an array of optional properties names.
Api owning the resource as a sibling
Direct ancestor in RAML hierarchy
Parent resource for non top level resources
Relative URL of this resource from the parent resource
Remove node from children set
node to be removed
Children resources
for user class instances returns object representing actual user class
securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme.
Instantiation of applyed resource type
Uri parameters of this resource
Generated using TypeDoc


2 references to DoConcurrentCheck
System.Management.Automation (2)
engine\hostifaces\ConnectionBase.cs (1)
1054
pipeline.
DoConcurrentCheck
(syncCall, SyncRoot, true);
engine\hostifaces\pipelinebase.cs (1)
656
DoConcurrentCheck
(syncCall, syncObject, isInLock);


genes protein adventitious up-regulated expression stress down-regulated cell gene involved auxin response Plant genes, heat rooting shock root vs. family using plant treatment DEGs proteins -like, formation transcription factor signalling Arabidopsis results pathway (), mung ref|XP_.| significantly -fold Wat analysis wall bean including oxidative regulated biosynthesis file kDa Cell RNA-Seq development activity cellular highly molecular {border-style RNA Wat, acid activity, expressed levels metabolism peroxide px;} #ffffff;} Additional class coding pathways process protein-like regulation treatment. unigenes -induced GOs HO, ethylene increased kinase protein, total NAC Physiol data number processes samples seedlings signal time AP/ERF finger functions glutathione growth hydrogen shown tolerance water IBA differentially factors function hormone reads roots -like DNA Table biosynthetic cytokinin efflux known peroxidase used zinc List associated important kb) lateral redox response, sample transporter various (XLSX ARF Fig. LINK Sci Zhang cDNA extracellular lipid metabolic oxidase oxygen qRT-PCR related required result sequence small study suggesting synthase transport ./pp.. DEG DEGs, ERF KEGG PCR act acts auxin-induced carrier homeostasis induction initiation isoflavone isoform regulator responses salt software specifically (Additional ./s--- ./tpc.. Biol LBD LOB WRKY abiotic abundance cuttings early encoding fold histidine induced mainly oxidoreductase performed proteins, px; reactive resulting showed stresses strongly synthesis terms transcriptome transduction {font-family (Fig. ARF, AUX/IAA Bot HSF LBD, MATE MYB Mol Total according analysed assembly cognate compared font-size indicate indicates loosening members method plants processes, receptor reference region resistance respectively. role rooting, secondary selected sequences signaling stage treatment, treatments (-fold), ./j.-X...x BMC Furthermore, Gene Genomics HSP IBA-induced PER Wang amino antioxidant article changes chaperone component control degradation double; electron enhanced enriched enrichment exogenous genes. genes; group groups hypocotyl indicating molecule phenylpropanoid physiological play polygalacturonase previous process, receptor-like reductase, regulate reported rice roles signalling, species stress, synthesis, transcription, up- wounding (Table -priming ABC AHK, Aux/IAA ERF-like Genes Hydrogen IAA, Illumina Liu MYB, PIN ROS RPKM S-transferase STOP abscisic assembly, bHLH bHLH-like, biological biotic border-color border-width cationic cells change cycle cysteine-rich death detoxification division downstream elongation enzyme essential example, expansin-like flavonoid functional germin-like higher influx inhibitor key leading listed meristem metabolism, nitrogen novo petunia priming produced profile profiling quality quantitative ratio regulating relative sequencing solid; sugar thaliana that, treated treatments, unigene wide {font-style {font-weight (.%) (Vr (glutathione .%, ACS AHK AMPure ARFs Analysis Auxin B-like, BAG Chen Dof ERF-like, Exp Feng GPX Glutathione Heat KOs Mix NAC, QORL RPKM ≥ Res Rev Shi acid-stimulated acids application assembled auxin-responsive available belongs binding biogenesis bold chaperones chromatin clean clustered components compound concentration courier; data. demonstrated development. developmental different differential differentiation dioxygenase disease domain drought em; enzymes ethylene, gibberellic gibberellin greatly group, homolog, hydrolase information initiated large mapped mechanism mediated membrane min, modulation movement, multiple numbers occurred oxidase, pathways, patterns pectinesterase plants. polyphenol present processing promotes provides pt;} pterocarpan q-PCR ratios reductase remodeling respectively respectively, reveals rooting. separately similar stages threshold toxic transduction, transporter-like transporters up-regulated, up-regulation vs.Wat zipper


TREKKIES
A Film Review by Brian Takeshita
Rating: ** out of ****
I used to be able to say, "I love Star Trek." Back then, you could say that and everyone would know what you were talking about. These days, with the old series, the movies with the old cast, The Next Generation, the movies with the Next Generation cast, Deep Space Nine, and Voyager, I have to really qualify my statement. I love the old series and the movies with the old cast. I like the Next Generation and their movies. I have almost no feeling toward Deep Space Nine and Voyager. To see the premiere of the new Star Trek film used to be something really special. Today, there's so much Star Trek, a new movie is practically taken with a grain of salt. What, I have to PAY to see this?
Still, there is currently a larger fan base for the entertainment enterprise than ever before, and it's even more diverse due to all the different forms of Star Trek available. They come from all walks of life. They are doctors, students, psychologists, housewives, radio personalities. They are from the upper class and the lower class and everywhere in between. Many may not even speak the same language, but they all have one thing in common: They like the message that Star Trek delivers. If we try hard enough, we will all survive and get along with each other in the future. But just what makes a person devote more than a passing interest to a television show? What kind of a person attends conventions, or dresses up like his or her favorite character when it isn't even Halloween? It's these types of questions Roger Nygard tries to answer in his documentary, TREKKIES.
After the first five minutes or so, I thought I was going to be sick. The film immediately begins documenting the extreme in Star Trek fandom; the ones that take the show way too seriously. The freaks. Sounds of laughter erupt from different pockets of the theater, and it seems this film is taking cheap shots and making people laugh at the expense of others. I felt embarrassed. Unfortunately, this trend lasts a while until we spend more time with each of a number of fans and their lives get a little more personal to us.
The documentary shows us a pretty wide range of people who are associated with Star Trek, but the most time is spent with those who have seemingly gone off the deep end. After all, the normal people are boring, right? A few people we meet are a dentist whose practice is one big Star Trek fantasy (his office is adorned with all kinds of memorabilia and he and his assistants are dressed daily in costume), a man who wears his costume to the supermarket and would get his ears cut to points like Mr. Spock's if he could afford it, and young man who is making his own Star Trek movie.
TREKKIES is narrated by Denise Crosby, who played Lieutenant Tasha Yar for the first year and a half of the series, Star Trek: The Next Generation. Crosby also serves as the interviewer in many of the film's sequences, and it's nice that she seems to be going on the same journey we are. It's as though she is facing these people with the same unjaded incredulity, and head-shaking amazement as the audience, even though we know she must have faced some of this before. However, if it's an act, it's a good one.
Whereas we'd like to end up feeling a connection with the fans in TREKKIES, the film doesn't go into sufficient depth so that we understand why they do the things they do. Is it insecurity? The need to feel like they "belong" to something? Or is Star Trek just something they think is really, really cool? By staying on the surface, we unfortunately never get far past the feeling of amusement or even pity. Take, for example, a woman who belongs to a Star Trek fan club in which they assign ranks to members. She insists that her co-workers at Sir Speedy print shop refer to her as "The Commander," and although she may not wear her uniform every day, the communicator, phaser, and rank insignia are usually found as accessories to her apparel. We might admire the fact that she is so devoted to her passion and her club, but she likens the wearing of the uniform to being part of a military organization. The thing is, it's not like that at all. Her uniform is part of a television show and isn't meant to be worn in public, save for the novelty. By the way, this woman was actually on the O.J. Simpson trial jury, and yes, she wore the uniform to court every day.
Another woman we meet is obsessed with Brent Spiner, who plays the android Lieutenant Commander Data on The Next Generation.  Since she lives relatively close to his home, she goes out on her balcony and gazes toward it to cheer her up when she feels depressed. One fan talks about the informal backyard gatherings he annually attends in the unofficial birthplace of James T. Kirk, Riverside, Iowa. He informs us that the previous year was great. They had a few more people, and even "had a girl come." This is not a film with a lot of sympathy toward its subjects.
One of the better elements of TREKKIES is its interviews with the cast members, who share some truly interesting and touching anecdotes involving their experiences with fans. For example, James Doohan, who played Scotty in the original series, literally saved a fan's life by keeping in contact with the suicidal girl and telling her he wanted to see her at the next convention. However, a movie that is essentially about the fans cannot be built upon pieces such as this, and must revolve around the fans themselves. It's a pity that Nygard's documentary only gives us unfeeling looks at the extremes, as the gems involving the actors contrast greatly to the bleak picture painted for us by the fans about which they are supposed to be talking.
If this film had delved deeper into the "normal" folks who enjoy Star Trek without having it run their lives, it would have provided a much needed balance. Would this have been less interesting than seeing fans who live and breathe Star Trek? On the contrary, I believe it would have helped answer the original questions of who these people are and why they like Star Trek. We would have found that they aren't just the people you'd cross the street to avoid, but are also you and me. Instead, we only learn that there are some pretty strange people in the world.
Review posted May 25, 1999
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Library of Congress Colors
The Library of Congress has thousands of digitized images online. What are the color clusters in each image, within particular collections?
Click on a block of colors to view the source image. Each string of six swatches represents an image in the selected collection. Swatch colors are determined using k-means clustering. The colors that appear are not necessarily the most frequent colors, but the center of a cluster of color values. Since the whole image is analyzed, color targets, borders, and frames will affect the result.
This project uses thumbnail images from Library of Congress digitized collections, accessed via the Loc.gov JSON API.
See the code on GitHub for this project, or:
- Jupyter notebook with the Python code used to access the API and analyze the colors.
- Download JSON and CSV files with image URLs and colors for each collection.


Welcome to the Ohio Transit Authority!
Most of our commuters travel to Akron. For a different route, please click
your source and destination cities. Clicking a new city now will show a path from Akron to the new city.
The distance to your destination is:
0


Station Information
Welcome to Dublin Bikes Tracker! Select a station from the drop-down menu to check the current number of available bikes and free stands. Or find the station on the map and click its marker. These circle markers use colour to indicate bike availability and size to indicate stand availability.


| < Day Day Up > |
6.4 TechniquesWith all the basic theory and recommendations covered, it's time to get down to business. When you notice your server is slow, what can you do about it? How do you locate the bottlenecks? What tools are available? What's the thought process? The first step is to identify the type of bottleneck at the operating-system level. Using standard operating system tools, try to determine which of the server's resources are being taxed. Using top, vmstat, or the Windows Task Manager, check the machine's CPU utilization. If it's at or near 100%, it's obviously CPU-bound. Use top to verify which processes are responsible for the bulk of the CPU utilization. (If you don't have much experience with operating-system performance tools, consult a qualified system administrator.) If MySQL is indeed consuming lots of CPU time, there are several techniques you can employ in an attempt to reduce the CPU load. See Section 6.4.2 later in this chapter. If the processes using the bulk of the CPU time aren't mysqld, you clearly have to solve a problem unrelated to MySQL. Perhaps it's a runaway process or simply something that should be moved to another machine. Either way, it's not a MySQL issue, so the problem is "solved" from our point of view. If the CPU is very busy but there doesn't appear to be any obvious process or group of processes using a large amount of CPU time, look at the division between system and user time. If there's an unusually high amount of time being spent on system (kernel) tasks, that may be a sign of a MySQL configuration problem or something completely unrelated. See Section 6.4.4 later in this chapter for an example of why MySQL might be working the kernel too hard. If the CPU is relatively idle because it's frequently waiting for the disks, see Section 6.4.1. You'll know this because of the higher than normal numbers you see with vmstat and/or iostat. If the CPU is waiting on disk I/O because of swapping activity, however, go to Section 6.4.3. 6.4.1 Solving I/O BottlenecksDisk (I/O) bottlenecks tend to be the most common MySQL performance problem. They're typically caused by inefficient queries—meaning that MySQL has to read too many rows to locate the data you're interested in. Usually that means your queries aren't using an index, or they're using an index that's not terribly effective for this particular query. Before going much further, be sure you've reviewed Chapter 5. Diagnosing a query that's not using an index is relatively easy. If you've enabled the slow query log (see Section 5.3 in Chapter 5) and set log-long-format, MySQL automatically logs any query that doesn't use an index. You really need to start with that query: use EXPLAIN and do simple benchmarks when you have more than one way to write a given query. After you've looked at any slow queries and fixed them, the next things to look at are more subtle issues. In some cases, queries do use an index and run relatively fast, so MySQL never considers them to be slow, but it's actually the wrong index from a performance point of view. There may be an alternative index MySQL can use to further decrease the I/O required. <IP_ADDRESS> Wrong indexFinding queries that use the wrong index can be more of a challenge. It requires an intimate understanding of your data and the queries being run against it. A real-world example may help to illustrate how subtle the problem can be. Jeremy uses the mod_log_sql Apache module to record all his web site hits into a MyISAM table named access_jeremy_zawodny_com. The table is roughly 1.3 GB in size, contains over 6 million records, and looks like this: +------------------+----------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+----------------------+------+-----+---------+-------+ | agent | varchar(255) | YES | MUL | NULL | | | bytes_sent | int(10) unsigned | YES | | NULL | | | child_pid | smallint(5) unsigned | YES | | NULL | | | cookie | varchar(255) | YES | | NULL | | | request_file | varchar(255) | YES | | NULL | | | referer | varchar(255) | YES | | NULL | | | remote_host | varchar(50) | YES | MUL | NULL | | | remote_logname | varchar(50) | YES | | NULL | | | remote_user | varchar(50) | YES | | NULL | | | request_duration | smallint(5) unsigned | YES | | NULL | | | request_line | varchar(255) | YES | | NULL | | | request_method | varchar(6) | YES | | NULL | | | request_protocol | varchar(10) | YES | | NULL | | | request_time | varchar(28) | YES | | NULL | | | request_uri | varchar(255) | YES | MUL | NULL | | | server_port | smallint(5) unsigned | YES | | NULL | | | ssl_cipher | varchar(25) | YES | | NULL | | | ssl_keysize | smallint(5) unsigned | YES | | NULL | | | ssl_maxkeysize | smallint(5) unsigned | YES | | NULL | | | status | smallint(5) unsigned | YES | | NULL | | | time_stamp | int(10) unsigned | YES | MUL | NULL | | | virtual_host | varchar(50) | YES | | NULL | | +------------------+----------------------+------+-----+---------+-------+ There are separate indexes on four columns: agent, time_stamp, request_uri, and remote_host. The intention is to provide an efficient way to produce statistics based on time, user agent (browser), the document fetched (request_uri), or the client (remote_host). Notice the indexes on each of those columns. Most queries ran very quickly, but one particular query was problematic. It seemed to run longer than expected. After repeated execution and watching vmstat output, it became clear that a lot of time was spent waiting on the disk. The query attempts to find out which documents a given client has requested during a particular time range—usually a single day. It is run once for every client that requested anything in the past day. The request looks like this: select request_uri from access_jeremy_zawodny_com where remote_host = '<IP_ADDRESS>' and time_stamp >=<PHONE_NUMBER> and time_stamp <=<PHONE_NUMBER> order by time_stamp asc Running the query through EXPLAIN proved to be quite interesting: mysql> explain select request_uri from access_jeremy_zawodny_com -> where remote_host = '<IP_ADDRESS>' -> and time_stamp >=<PHONE_NUMBER> -> and time_stamp <=<PHONE_NUMBER> -> order by time_stamp asc \G *************************** 1. row *************************** table: access_jeremy_zawodny_com type: ref possible_keys: time_stamp,remote_host key: remote_host key_len: 6 ref: const rows: 4902 Extra: Using where; Using filesort 1 row in set (0.00 sec) MySQL chose to use the index on remote_host. But it doesn't always make that choice. Sometimes it decides to use the index on time_stamp. Here's an example: mysql> explain select request_uri from access_jeremy_zawodny_com -> where remote_host = '<IP_ADDRESS>' -> and time_stamp >=<PHONE_NUMBER> -> and time_stamp <=<PHONE_NUMBER> -> order by time_stamp asc \G *************************** 1. row *************************** table: access_jeremy_zawodny_com type: range possible_keys: time_stamp,remote_host key: time_stamp key_len: 5 ref: NULL rows: 20631 Extra: Using where 1 row in set (0.01 sec) The only difference between those two queries is the IP address we're looking for. In each case, MySQL's query optimizer estimates the number of rows it will need to read to satisfy the query using each possible index. In the first example, it decides that there are fewer records with a remote_host of <IP_ADDRESS> than there are records in the specified 24-hour time range. In the second example, it does just the opposite, deciding the time range will result in fewer rows to read. By experimenting with various IP addresses, it doesn't take long to find one for which MySQL makes the wrong choice. It chooses the remote_host index when using the time_stamp index is actually faster—even though the remote_host requires reading the fewest rows.[4] How is that possible?
The underlying assumption is that all rows cost roughly the same amount of time to read. But this is a case in which that's not always true. Consider how the data will be stored in this MyISAM table. Apache is logging requests to the table all the time and has been doing so for over a year. Rows are never removed, so the data is already sorted by timestamp in the table and on disk (assuming minimal fragmentation). Once you have a nontrivial amount of information in a table like this, the rules change a bit. If we assume that the records for a given IP address are evenly distributed among the millions of records, it's clear that using the remote_host index may result in many more disk seeks. And since disk seeks are slower than reading consecutive blocks from disk, it follows that MySQL may be doing less work (evaluating fewer rows) but the disk is doing more work—using precious seek time that may slow down other queries too. In logging applications when you're frequently querying based on a time range as well as another indexed field, this problem is quite common and has no good generalizable solution. If you have some insight into your data and can add it to the software that writes the queries, that can help a lot. The software could be configured to tell MySQL which index to use. For example, if your software knows that a given IP address shows up only very infrequently recently, it can force MySQL to use the time_stamp range: SELECT ... USE_INDEX(time_stamp) ... It's not the ideal solution, but it is quite effective when used appropriately. <IP_ADDRESS> Temporary tablesAnother problem that doesn't show up in the slow query log is an excessive use of disk-based temporary tables. In the output of EXPLAIN, you'll often see Using temporary. It indicates that MySQL must create a temporary table to complete the query. However, it doesn't tell you whether that temporary table will be in memory or on disk. That's controlled by the size of the table and MySQL's tmp_table_size variable. If the space required to build the temporary table is less than or equal to tmp_table_size, MySQL keeps it in memory rather than incur the overhead and time required to write the data to disk and read it again. However, if the space required exceeds tmp_table_size, MySQL creates a disk-based table in its tmpdir directory (often /tmp on Unix systems.) The default tmp_table_size size is 32 MB. To find out how often that happens, compare the relative sizes of the Created_tmp_tables and Created_tmp_disk_tables counters: mysql> SHOW STATUS LIKE 'Created_tmp_%'; +-------------------------+-------+ | Variable_name | Value | +-------------------------+-------+ | Created_tmp_disk_tables | 18 | | Created_tmp_tables | 203 | | Created_tmp_files | 0 | +-------------------------+-------+ If you create a lot of disk-based temporary tables, increase the size of tmp_table_size if you can do so safely. Keep in mind that setting the value too high may result in excessive swapping or MySQL running out of memory if too many threads attempt to allocate in-memory temporary tables at the same time. Otherwise, make sure that tmpdir points to a very fast disk that's not already doing lots of I/O. As a last resort, consider using a tmpfs (or ramdisk, or mdmfs, or whatever your OS calls memory-backed filesystems) and setting $TMPDIR to point there when starting MySQL. <IP_ADDRESS> CachingIf your queries are already optimized and using the most efficient indexes, it's still possible to run into I/O bottlenecks at some point. Simply running too many queries, no matter how efficient they are, can become too much for the disk(s) to keep up with. If so, it's time to consider caching. The easiest thing to do is make sure you're using the MySQL query cache. Available since MySQL 4.0, the query cache keeps the results of frequently executed SELECTs in memory so that MySQL doesn't need to perform any disk I/O at all. See Section 5.4.4 in Chapter 5 for more information. Taking things a step further, you might consider application-level caching. If there's data that doesn't change frequently at all, query for it once in a while and store it in memory or on local disk until you requery for it. <IP_ADDRESS> Spread the loadIf you've already covered the causes listed earlier and implemented the suggestions, it's likely that you need to spread the I/O load more effectively. As described earlier, installing disks with faster RPMs and lower seek times may help. Using RAID (especially RAID 0, RAID 5, or RAID 10) will spread the work across multiple disks, possibly eliminating or reducing the bottleneck. Another option, if you have multiple disks and can't easily configure RAID, is to attempt to balance the disk I/O manually. Spend some time with iostat or systat (depending on your OS) to discover where the bulk of the I/O is going. If you have all your MySQL data on a single disk, you can try moving pieces to another disk. If the majority of activity is focused on a small group of tables, consider moving them to a separate disk. Another approach is to separate predominantly random I/O from that which is mostly serial. Store logs such as the binary logs, replication relay logs, and InnoDB transaction logs, on a separate disk from the actual data files. It's ultimately a game of trial and error. As with benchmarking, keep a close eye on the numbers and try not to change too many things at once. Finally, replication is always an option. If you've simply outgrown the capacity of a single machine, it's often the least disruptive solution. See Chapter 7 to learn all about replication. 6.4.2 Solving CPU BottlenecksCPU bottlenecks in MySQL can be difficult to track down. Unlike some database servers, MySQL currently doesn't provide per-query statistics about the amount of time spent actually doing work versus waiting for disk I/O to complete. Luckily it doesn't have to be a complete guessing game. If you see a query in the slow query log and suspect that it may be CPU-bound, simply benchmark it. Pull out a copy of MySQL super-smack, and run it a few thousand times in a row. Then, in another window, watch top, vmstat, or your favorite system monitoring tool. If the CPU quickly hits 100% utilization even with a relatively low number of concurrent queries, the query is very likely CPU-bound. If you find yourself staring at a very large list of slow queries, how do you decide which ones to start analyzing? Easy: look for those that examine a large number of rows (thousands, tens of thousands, or more), and focus on those that use any of MySQL's built-in data-manipulation functions. Common suspects are those that:
You'll often find that something as simple as computing an MD5 hash over millions of values per hour is using too much CPU time. By moving the logic into the application servers that query that database, you'll free up CPU time for work that only MySQL can do efficiently. If you can't easily ask MySQL to do less work by moving logic into the application layer, you always have the option of throwing hardware at the problem. You can do this in one of two ways. You might simply upgrade the CPUs in your server or add more CPUs if there's room. Alternatively, you may find it less expensive and more scalable to add new servers, replicate the data to them, and spread the load among them. There's nothing wrong with using Moore's Law to your advantage once in a while. High CPU utilization with MyISAM tables isn't always bad. It may mean that you are doing queries on tables that have been entirely cached in the operating system's cache. This may or may not be a bad thing. It's certainly better than reading from disk, but each time MySQL has to ask the OS for a block of data, that's CPU time that could be better spent processing the rest of the query. Moving to InnoDB or BDB tables lets MySQL cache table data itself, so it doesn't have to ask the OS for records. 6.4.3 Solving Memory BottlenecksTuning memory usage on MySQL servers can be a delicate balancing act. As explained earlier, MySQL has some global memory buffers in addition to a number of per-thread buffers. The trick is to balance the performance gains that come from having large global buffers against the need to service a particular number of concurrent users. At a minimum, you should have enough memory available to handle MySQL's global buffers plus the per-thread buffers multiplied by the maximum number of concurrent connections you will use. Expressed mathematically, that is: min_memory_needed = global_buffers + (thread_buffers * max_connections) where thread_buffers includes the following:
and global_buffers includes:
We say that's the minimum memory required because ideally you'd like some left over for the operating system itself to use. In the case of MyISAM tables, "spare" memory will often be put to use caching records from MyISAM data (.MYD) files. In addition to any memory the threads may allocate in the process of handling queries, the threads themselves also require a bit of memory simply to exist. The thread_stack variable controls this overhead. On most platforms, 192 KB is the default value.[5]
A likely problem is typified by an all-too-common scenario. Imagine you have a server with 1 GB of memory hosting a mix of MyISAM and InnoDB tables—mostly MyISAM. To get the most bang for your buck, you configure a 512-MB key_buffer after watching the key efficiency in mytop (see Appendix B) and a 256-MB innodb_buffer_pool after checking the buffer pool and memory statistics from SHOW INNODB STATUS (see Appendix A). That leaves 256 MB that is used to cache data files at the operating system level as well as the per-thread buffers that are allocated on an as-needed basis. The MySQL server handles a relatively small number of concurrent users, maybe 20-50 most of the time, and the per-thread buffer settings are all left at their default sizes. Things work very well until a few new applications are built that also use this MySQL server. These new applications need a significant number of concurrent connections. Instead of 20-50 connections on average, the server is handling 300-400. When this happens, the odds of several connections needing to allocate a per-thread buffer (such as the sort_buffer) at the same time increase quite a bit. This can lead to a particularly nasty series of events. If a large number of threads need to allocate additional memory, it's probably because the server is handling a heavy query load. That can cause MySQL to allocate so much memory that the operating system begins swapping, which causes performance to degrade further, which means that each query takes longer to complete. With queries running more slowly, the odds of more threads needing memory increases. It's a vicious spiral. The only solution is to restore balance between the system's memory and MySQL's memory needs. That means doing one of the following.
Be proactive. Monitor memory use on your servers. Do the math to ensure that in the worst case (hitting max_connections and each thread allocating additional memory), you'll still have a bit of breathing room. 6.4.4 Solving Kernel BottlenecksThough it's not common, you may find that MySQL doesn't appear to be using an overwhelming amount of CPU time, yet the machine is rather busy. There's little idle CPU. Upon looking at it more closely, you find that quite a bit of the time is spent in "system" rather than "user" or "idle." That's likely a sign that MySQL is doing something unusual to exercise the kernel—usually creating and destroying threads. This happened at Yahoo! during the launch of a new web site. In September 2002, engineers were scrambling to create a September 11th memorial web site known as remember.yahoo.com.[6] On it, anyone could create a memorial "tile" by selecting a graphic and adding a customized message. The tile was then viewable by anyone visiting the site. To get the job done as quickly as possible, it was constructed using standard open source tools, including FreeBSD, Apache, PHP, and MySQL
The architecture was relatively straightforward, but we'll simplify it a bit to focus on the main point. A group of frontend web servers was configured to connect to a slave server by way of a hardware load balancer. Using the slave connection, the server could pull the information necessary to display the tiles. When a visitor created a tile, however, the web server needed to connect to the master to insert several records. The master was a beefier machine: dual 1.2-GHz CPUs, 2 GB of RAM, and a SCSI hardware RAID 5 disk array. At its peak, there were roughly 25-30 web servers that needed to work with the master. Each server was configured to run roughly 30-40 Apache processes. That meant the master would need to support over 1,000 concurrent clients. Knowing that could tie up substantial resources on the master, the designers opted for a simplified approach. Unfortunately, the web application (written in PHP) was configured to use persistent connections. So, to keep connection numbers down on the master, the wait_timeout was set very low—to roughly 10 seconds. By and large, it worked. Idle connections were dropped after 10 seconds. The number of connections on the master remained below 200, leaving lots of resources free. But there was a problem: the CPUs in the master were quite busy. Most of the time there was less than 10% idle time, and nearly 50% of the CPU time was being spent on system (rather than user) tasks. After an hour or so of head-scratching, looking at system logs and the output of SHOW STATUS, a light finally flickered on in Jeremy's head. The value of Threads_created was very large and increasing at an alarming rate. The kernel was so busy creating and destroying threads that it was eating into MySQL's ability to use the CPUs effectively. With that realization, the solution was easy. Increasing the thread_cache from its default value of 0 to roughly 150 resulted in an instant improvement. The system CPU time dropped to roughly 10%, thus freeing up quite a bit of CPU time for MySQL to use. As it turns out, MySQL didn't need it all, so the machine ended up with 20% idle time—breathing room. |
| < Day Day Up > |