Welcome to LQ linuxpicaxe, sorry to see it is on such a sad occasion. Since the first reply was a bit short on nfo:
Basically formatting a filesystem will layer a "mesh" over disk contents (in contrast to zeroing out a partition which destroys filesystem contents). So everything that is not touched by the newly created structure is more or less available. The problem is that entities are linked to their parent. For example a file is linked to it's parent (a directory) and a subdirectory is linked to its parent (a directory) as well. To confuse you even more, files which size exceeds a certain size will be broken up and "recorded" in different parts of the filesystem and those parts may be linked directly or indirectly. Mutilating the existing filesystem hierarchy and structure (the original mesh) by formatting destroys those links.
Photorec (or
foremost, scalpel, pyFLAG, et cetera) will try to determine the start and end of a file looking for distinct header and footer signatures (called carving). This is kind of a brute-force approach since not all files have distinct header and footer signatures and if there's files mixed in between they may be carved out as part of the result as well.
The best way to procede would be to boot a Live CD like the
Helix 2008R1(2.0) ISO (MD5 hash 93a285bfa8ab93d664d508e5b12446d3) and make a bit-by-bit copy of the disk to another separate physical medium (removable USB storage?) before doing anything else with the disk. This way you always have a backup to fall back on might the need arise. When you use any of those tools best boot your Live CD too, bo need to mount partitions, and always recover to a separate drive. If you've got lots of files it may help to hash your backup files so you can easily weed out files you already have. You can use
md5deep to piece-wise hash disk parts to find out if any parts of files you already have end up in erroneously carved results.
Searching LQ will yield some posts about accidentally formatted partitions for you to read, else ask away.
GL